Code Monkey home page Code Monkey logo

Comments (7)

tbranyen avatar tbranyen commented on May 27, 2024

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.

tbranyen avatar tbranyen commented on May 27, 2024

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.

wjcrowcroft avatar wjcrowcroft commented on May 27, 2024

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.

tbranyen avatar tbranyen commented on May 27, 2024

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.

wjcrowcroft avatar wjcrowcroft commented on May 27, 2024

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.

tbranyen avatar tbranyen commented on May 27, 2024

@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.

wjcrowcroft avatar wjcrowcroft commented on May 27, 2024

sweet - will check it out!

from backbone-boilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.