Commit Graph

8 Commits

Author SHA1 Message Date
Tim Schaub
d59eed5d3b Accept additional args when publishing 2019-08-07 00:01:57 -04:00
Tim Schaub
1b745dc7b7 Update the publish.sh script 2018-07-20 18:31:25 -06:00
Tim Schaub
530419a839 Correct path to cleancss 2017-04-13 21:20:34 -06:00
Andreas Hocevar
7424ee91e3 Remove the '3' from OpenLayers 2017-01-02 23:03:03 +01:00
Tim Schaub
91d6844ecd Install latest dependencies before building 2015-08-04 00:30:39 -06:00
Andreas Hocevar
1b640870b1 Add css to dist directory 2015-03-06 11:20:01 +01:00
Tim Schaub
9b0349f2d5 Variable for builds directory 2014-12-20 02:55:56 -07:00
Tim Schaub
3582445755 Add task for publishing to npm
This task publishes an existing tag to the npm registry.  To publish a new release, create a commit that updates the version number in package.json (e.g. to "3.1.0").  Then create a tag, push to GitHub, and run the publish task.  Assuming "openlayers" is the remote for the canonical repo, this would look like the following:

    git tag -a v3.1.0 -m "3.1.0"
    git push --tags openlayers
    ./tasks/publish.sh 3.1.0

The task creates a build for each of the `PROFILES` in `publish.sh` (these correspond to `.json` files in the `config` directory).  Builds are generated in the `dist` directory.  Our `package.json` specifies `dist/ol.js` as the "main" build.  So when people use a module loader to `require('openlayers')`, they get the full build.  It is also possible to load a debug build (e.g. `require('openlayers/dist/ol-debug')`), and we can publish additional builds by adding `config` files and updating `PROFILES` in `publish.sh`.

The `.npmignore` file determines what is *not* included in the package (note that `node_modules` are always ignored).  So if additional items are added to `.gitignore` that should not be included in the npm package, they need to go in `.npmignore` as well (ideally, we don't need to generate anything else outside of the `build` directory that doesn't belong in the package).
2014-12-19 17:45:48 -07:00