Comments (7)
Something I'm thinking about is whether or not debug and release folders are even necessary. Perhaps it'd be smarter to just have a single output build /dist
and then that would change based on how you build. From there I can create a copy task that will copy in all specified files from the build config.
Then you could simply rename dist
to assets
. I think figuring out a solid and flexible deployment strategy is the next big concern.
from backbone-boilerplate.
Yes, I am liking this more and more.. So much easier to describe deployment. Your server will always serve /assets
mapped to /dist
. In node build server dist
I can swap out /assets
directly for the /dist
folder.
from backbone-boilerplate.
I'm no expert on this, but I will say that there are a few things that matter in any solution you come up with:
- hassle-free (one line, or a watcher task, and no manually moving things around afterwards. that's shitty work.)
- easily configurable and extensible (there's no single solution)
- well-documented
- serves as a best practice indication
- simple to understand
I figured out the last step first, when writing the build-o-matic for our app at work - what's the simplest thing possible? (In our case, it was having everything copied over into a /production
directory, a self-contained app-in-the-bag, which is deleted and recopied each time. there might be a better way of doing diff-based rewriting, but whatever.)
Having the server always map /assets
to /dist
might be the solution, and might work automagically when using the node server, but would it require any shitty work when your production environment is another HTTP server?
If so it's not a dealbreaker, as long as it's easy enough to understand and well-documented, so that other servers can have their own mods to the build script, maybe.
Finally - the best practice thing - the build script in the boilerplate ought to be a suggested best practice, so it might be worth asking a heap of other JS devs what they're doing for builds exactly, and forming a consensus based on that... though only up to a point.
from backbone-boilerplate.
I think the new way of mapping folders in the server directives inside the amd
branch will alleviate issues with this. Copying entire assets every time doesn't seem like the direction I want to take the building, especially with something like r.js.
If you feel this should still be considered, feel free to reopen.
from backbone-boilerplate.
Yeah, so if using r.js, this is something it does automatically - basically anything that helps make deployment as one-click as possible is awesome.
from backbone-boilerplate.
@josscrowcroft With the current setup in the AMD branch, you do not need to touch index.html for development, debug or release.
from backbone-boilerplate.
sweet - will check it out!
from backbone-boilerplate.
Related Issues (20)
- CRUD application examples using bbb HOT 4
- Faulty link in Wiki HOT 4
- Grunt script fails HOT 4
- build process - grunt running requirejs task
- Can't find variable: require HOT 1
- Examples of modules HOT 1
- copy.coffee still referencing vendor directory HOT 1
- Running Karma: ReferenceError: Can't find variable: waitsFor HOT 2
- Wiki isssue
- Error from PhantomJS during Testing HOT 1
- UI Components Question HOT 1
- Loading "server.js" tasks...ERROR HOT 6
- Working towards a 2.0 HOT 2
- JSHint => ESLint HOT 2
- EPEERINVALID on npm install HOT 7
- Application provided as default is initialized twice. HOT 7
- Failed at the [email protected] start script 'grunt'. HOT 22
- Documentation needs updating HOT 5
- Build issues HOT 1
- Views HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backbone-boilerplate.