Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ability to have grunt build release and dev instances of project #45

Closed
aaronr opened this issue Apr 15, 2015 · 3 comments
Closed
Assignees

Comments

@aaronr
Copy link
Member

aaronr commented Apr 15, 2015

There is no current way (other than modifying a tracked index.html file) to change to use non-minified versions of the code. Also the index.html file is not placed in the dist dir like it should. I understand that there where reasons to do this... but there must be a better way:

  1. Have index.html end up in dist like the rest of the project when built.

  2. Change the gh-pages stuff to just publish the contents of dist.

  • This gets rid of all the extra stuff that is being published that should not be (config files etc)
  • Everything is at the right level then (i.e. index.html is no longer treated special)
  1. Make index.html based on a template in the root folder, but use a grunt html processor to build out the real index.html based on build type. Some possible grunt tools already exist:
  1. Make grunt serve and the connect stuff for grunt serve from the dist dir.

In the end you would be able to specify build type... each would pre-process the index.html to the proper form, populate the dist dir, and if updating master push a release version of the dist dir to gh-pages.

I plan to work on prototyping this (as a learning exercise for myself) in the aaronr_gruntwork branch

@alukach
Copy link
Member

alukach commented Apr 16, 2015

+1 to being able to develop off of L.DNC.js and serve off of L.DNC.min.js, the uglified file definitely takes some fun out of the dev process.

My $0.02: I think what would make this the easiest/most-natural-to-develop-on would be to have the dev folder hierarchy match what we want the prod folder to be (starting with moving index.html to src/index.html). Basically, any assets that would make their way into dist/ should go into src/. Is this kind of along the lines of what you were thinking?

  1. Change the gh-pages stuff to just publish the contents of dist.

In the event that you haven't already looked into it, this is super trivial (assuming #44 is merged), you would only need to change the base arg to point to dist/.

@mapsam
Copy link
Member

mapsam commented Apr 16, 2015

👍 to all of this. Take it away @aaronr!

@alukach
Copy link
Member

alukach commented Apr 18, 2015

Fixed in #48

@alukach alukach closed this as completed Apr 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants