Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sandpaper

cpetta57MIT1.4.6

Sandpaper is a commandline tool that's used to smooth out the rough edges when coding websites using HTML, CSS, and Javascript.

gulp,, gulpfile, toolchain, linting, website-optimization

readme

Sandpaper

Dependencies Dependabot Status Build Status Coverage Status FOSSA Status XO code style semantic-release Total alerts

What is Sandpaper

  • Sandpaper is a command line tool that's used to smooth out the rough edges when coding websites using HTML, CSS, and JavaScript.
  • 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

  • Provide tools to help developers avoid common errors in HTML, CSS, and JavaScript.
  • Improve maintainability of code produced by developers.
  • Improve performance of webpages.
  • Automate common development tasks.

How Sandpaper helps achieve these goals

  • sandpaper --lint can be used to check for syntax errors, style errors, and other common problems in HTML, CSS, and JavaScript. Add the --watch flag to perform linting on every file save.
  • sandpaper --lint --strict is used to check for code style problems, keeping code consistently readable across different developers.
  • sandpaper --build uses minification to reduce the size of HTML, CSS, JavaScript. Additionally, images will be optimized.
  • sandpaper --sync watches files for changes, and automatically builds and reloads a webserver with your site.

Installation

npm install sandpaper -g

from your project folder which contains an /src folder run:

npm init sandpaper

Workflow

  1. Create and edit all your .html, .css, and .js files inside a folder named src.
  2. Open command prompt above the src folder, for instance, if you have /SomeProject/src open command prompt in the /SomeProject folder.
  3. Run the sandpaper command with your desired flags. all available flags are listed under [flags]

  4. Note: Running sandpaper with no flags is equivlent to running sandpaper --

Flags

--lint Check code for errors.

--build Optimize code and save to /dev or /dist (if --production is specified.)

--sync Start browser synchronized server, compiles code on change.

--strict Lint codding style in addition to errors.

--fix fixes coding style issues, such as tabs/spaces, indentation, and css property order.

--watch Remain running, re-lint or re-build whenever a file is changed.

--prod 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

if --strict flag is not specified

if --strict flag is specified

Libraries used for building

License

FOSSA Status

changelog

Changelog

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

1.4.6 (2020-12-05)

Bug Fixes

  • cli: create error message when not initialized (3e96e28)
  • lintjs: add error handling for missing files (e7058d8)

1.4.5 (2020-12-04)

Bug Fixes

  • build failing: various fixes (1629cad)

1.4.4 (2020-03-25)

Bug Fixes

  • jshint: move xo from devdep to dep (3a144df)

1.4.3 (2020-03-23)

Bug Fixes

  • csslint: switch to safe parser (a02543f)
  • imagemin: fix breaking change in imagemin (e71e25d)

1.4.2 (2020-03-23)

Bug Fixes

  • readme: missing periods (02c718f)

1.4.1 (2019-12-28)

Bug Fixes

  • compilehtml: display lint results on error (3327068)

1.4.0 (2019-10-24)

Bug Fixes

  • cli: default task no longer runs when arguments are given (2afb67a)

Features

  • autofix: add autofix for style issues (cea36e6)
  • xo: add additonal linting rule files (bddb5b4)

1.3.0 (2019-10-21)

Bug Fixes

  • normalize: force import of normalize.css (6b5a05f)

Features

  • css compiler: add normalization support (c8c999a)

1.2.0 (2019-10-21)

Bug Fixes

  • clean: function wasn't actually cleaning (0b7348a)
  • css compiler: replace mqpacker & cssnano w/ clean-css (cec4425)
  • markdown linter: improved output readability (c391e58)

Features

  • cli: added default task when there are no flags (4099fe8)
  • css compiler: add purgecss support (39027e9)
  • css compiler: add purgecss support (412abd7)

1.1.1 (2019-10-17)

Bug Fixes

  • updateNotifier: update notification should show now (3eae183)

1.1.0 (2019-10-16)

Features

  • strict lint: added doiuse checking (1bf0ea1)
  • Strict lint: Add indecernable color check to strict linting (6994f8f)

1.0.1 (2019-10-16)

Bug Fixes

  • clean: callback must be a function (4729b98)
  • clean: Callback must be a function (055f88e)
  • release: add missing sem-rel changelog dependency (c5259eb)
  • release: remove trailing comma (e7413ea)