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

Pin NPM packages using npm shrinkwrap for repeatable builds #794

Closed
wants to merge 4 commits into from

Commits on Jan 11, 2015

  1. Document dependency on less-plugin-clean-css

    As of Less version 2, the `--clean-css` functionality is provided by a
    plugin, less-plugin-clean-css. See:
    
    http:https://lesscss.org/usage/#v2-upgrade-guide-clean-css
    mattbostock committed Jan 11, 2015
    Configuration menu
    Copy the full SHA
    ac8b474 View commit details
    Browse the repository at this point in the history
  2. Update drone.css using make lessc

    Run `make lessc` using Less version 2 to update `drone.css`:
    
        » npm list -g uglify-js less autoprefixer less-plugin-clean-css
        /opt/boxen/homebrew/lib
        ├── [email protected]
        ├─┬ [email protected]
        │ └─┬ [email protected]
        │   ├─┬ [email protected]
        │   │ ├─┬ [email protected]
        │   │ │ └── [email protected]
        │   │ ├─┬ [email protected]
        │   │ │ └── [email protected]
        │   │ └─┬ [email protected]
        │   │   └── [email protected]
        │   └── [email protected]
        ├── [email protected]
        ├── [email protected]
        └── [email protected]
    mattbostock committed Jan 11, 2015
    Configuration menu
    Copy the full SHA
    10692f9 View commit details
    Browse the repository at this point in the history
  3. Pin NPM pkgs with shrinkwrap for repeatable builds

    Pin NPM packages with `npm shrinkwrap --dev`.
    
    Adds a minimal `package.json` created by running `npm init` and removing
    some lines; just enough to satistify `npm install` without it showing
    warnings.
    
    Add the `node_modules/` directory to the `.gitignore` file as we can
    probably rely on the NPM registry server and this diverges as little as
    possible from the current behaviour (i.e. don't vendor anything). The
    decision not to vendor the NPM modules can always be reviewed later.
    
    This commit tells NPM to install the packages in the current directory
    rather than globally, which will make it easier to vendor the NPM
    packages in future if desired.
    mattbostock committed Jan 11, 2015
    Configuration menu
    Copy the full SHA
    4430298 View commit details
    Browse the repository at this point in the history
  4. Run npm install each time make deps is invoked

    The NPM modules, used primarily to render the Less files into CSS, don't
    seem any less important than other build dependencies so I don't see the
    harm in running this every time `make deps` is invoked.
    mattbostock committed Jan 11, 2015
    Configuration menu
    Copy the full SHA
    d161092 View commit details
    Browse the repository at this point in the history