Skip to content

Housekeeping: Generate output files on prepublish; remove them from git - #118

Open
anko wants to merge 5 commits into
gkz:masterfrom
anko:untrack-output-files
Open

Housekeeping: Generate output files on prepublish; remove them from git#118
anko wants to merge 5 commits into
gkz:masterfrom
anko:untrack-output-files

Conversation

@anko

@anko anko commented Feb 13, 2019

Copy link
Copy Markdown

I am irritated by how much the generated files in lib/ bloat the git tree when I commit to this project. It's unnecessary to check in generated output files!

The prepublish hook takes care that the output files are built on npm publish or local npm install.

For prior art doing this type of thing with a LiveScript library, see—

Both store only check in the source LiveScript, not the generated JS.

This lets us remove them from Git tracking.  They're bloating the diff
of every commit completely unnecessarily.  The prepublish hook
https://docs.npmjs.com/misc/scripts runs automatically before `npm
publish`, and local `npm install`, ensuring the built JS files are in
place when needed.
@anko anko changed the title Generate output files on prepublish Housekeeping: Generate output files on prepublish; remove them from git Feb 13, 2019
Since it's no longer checked in.
@anko

anko commented Feb 13, 2019

Copy link
Copy Markdown
Author

Egch. 😠 Travis is failing to run lsc to build package.json from package.json.ls because of course lsc isn't installed at that point because there's no package.json to tell it to.

I think having a build metadata file (package.json.ls) that needs to be built first using one of the dependencies that it is specifying is ass-backwards and a horrible idea.

anko added 3 commits February 13, 2019 16:33
I think having a build metadata file (`package.json.ls`) that needs to
be built first _using one of the dependencies that it is specifying_ is
a bad idea.  Let's just use package.json.
@anko

anko commented Feb 13, 2019

Copy link
Copy Markdown
Author

Now of course Travis chokes on the same esprima-six@0.0.3 issue that I described and fixed in #117.

Ready for merge, after #117, in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant