What is Sandpaper
- Heavily inspired by XO, Sandpaper is a build system wrapper. It originally started as a gulpfile and has since been updated to use the commandline.
Primary Project Goals
- Improve maintainability of code produced by developers.
- Improve performance of webpages.
- Automate common development tasks.
How Sandpaper helps achieve these goals
--watchflag to perform linting on every file save.
sandpaper --lint --strictis used to check for code style problems, keeping code consistently readable across different developers.
sandpaper --syncwatches files for changes, and automatically builds and reloads a webserver with your site.
npm install sandpaper -g
from your project folder which contains an /src folder run:
npm init sandpaper
- Create and edit all your .html, .css, and .js files inside a folder named
- Open command prompt above the
srcfolder, for instance, if you have
/SomeProject/srcopen command prompt in the
- Run the
sandpapercommand with your desired flags. all available flags are listed under [flags]
- Note: Running sandpaper with no flags is equivlent to running sandpaper --
Check code for errors.
Optimize code and save to /dev or /dist (if --production is specified.)
Start browser synchronized server, compiles code on change.
Lint codding style in addition to errors.
fixes coding style issues, such as tabs/spaces, indentation, and css property order.
Remain running, re-lint or re-build whenever a file is changed.
Build for production, do not include source maps and minify code.
Sandpaper would not be possible without these great open-source libraries
Libraries used for linting
--strict flag is not specified
--strict flag is specified
Libraries used for building