Moving to modern build and dependency style#99
Closed
AndrewRayCode wants to merge 3 commits intosquarefeet:masterfrom
Closed
Moving to modern build and dependency style#99AndrewRayCode wants to merge 3 commits intosquarefeet:masterfrom
AndrewRayCode wants to merge 3 commits intosquarefeet:masterfrom
Conversation
This is a minor modernization of the project. You shouldn't require users to have global versions of packages installed. Using npm scripts means the grunt command will be available when the npm script is run. Note the indentation of package.json has changed to two spaces. This is because of the use of the automatic command `npm install --save-dev grunt`. Note any automatic npm command will change the spacing to 2 spaces, so I think it's best to keep it this way. Additionally this adds missing grunt plugins to the packages, which presumably you had installed along with your global grunt.
This is a first step to modernizing the codebase and to make it work with npm. Ticket squarefeet#95 currently tracks the npm build process.
Related to issue squarefeet#95, the source code of this project relies on the use of the global SPE variable and the global THREE variable. This makes it hard to track what files use what dependencies. Plus the javascript community has moved to commonjs or es6 module syntax for good reason. It makes it easier to work on projects. Relying on the order of a file included in an array of strings is not ideal for dependency management. This also removes the SPE namespace from files which felt redundant, and also mirrors the elimination of the SPE namespace attachments used inside those files. This namespaces all of the objects in a central place src/index.js and exports that as main from package.json
Owner
|
Closing in favour of #136 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the reliance on global variables and uses a modern commonjs syntax. I have not yet introduced ES6 syntax into this project so it's a smaller change (as in babel is not required).
Note this only fixes the npm build and I have not attempted to change the files in the build/ folder. The grunt code will need to be updated to handle the new syntax, instead of an array of file names in strings.