Skip to content

Commit

Permalink
updated base files
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Nov 5, 2016
1 parent 03a6f3c commit f9a383c
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 46 deletions.
58 changes: 46 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,61 @@
# 2016 October 21
# 2016 November 5
# https://github.com/bevry/base

# Use the latest travis infrastructure
sudo: false

# We use node
# https://github.com/nodejs/LTS
language: node_js
node_js:
- "0.8"
- "0.10"
- "0.12"
- "4"
- "6"
- "0.8" # end of life
- "0.10" # end of life
- "0.12" # maintenance
- "4" # lts
- "6" # lts
- "7" # stable
matrix:
fast_finish: true
allow_failures:
- node_js: "0.8"
- node_js: "0.10"
cache:
directories:
- node_modules

# Prepare our tests
before_install: if test "$(npm --version)" != "$(npm view npm version)"; then npm install -g npm; fi
before_script: "npm run compile"
# Ensure npm is up to date
# Ensure dependencies install with a LTS node version
install: |
export CURRENT_NPM_VERSION="$(npm --version)"
export LATEST_NPM_VERSION="$(npm view npm version)"
if test "$CURRENT_NPM_VERSION" != "$LATEST_NPM_VERSION"; then
echo "running an old npm version, upgrading"
npm instal npm --global --cache-min=Infinity
fi
# Run our tests
script: "npm test"
export CURRENT_NODE_VERSION="$(node --version)"
export LTS_NODE_VERSIONS="$(nvm ls-remote --lts)"
if echo "$LTS_NODE_VERSIONS" | grep "$CURRENT_NODE_VERSION"; then
echo "running on a LTS node version, completing setup"
npm run our:setup
else
echo "running on a non-LTS node version, completing setup on a LTS node version"
nvm install --lts
export LTS_NODE_VERSION="$(node --version)"
npm run our:setup
nvm use "$TRAVIS_NODE_VERSION"
fi
# Ensure compilation and linting occur on an LTS node version
before_script: |
if test "$LTS_NODE_VERSION"; then
echo "running on a non-LTS node version, compiling with LTS, skipping linting"
nvm use "$LTS_NODE_VERSION"
npm run our:compile
nvm use "$TRAVIS_NODE_VERSION"
else
echo "running on a LTS node version, compiling and linting"
npm run our:compile && npm run our:verify
fi
# Custom notifications
notifications:
Expand Down
24 changes: 7 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
2016 October 4
2016 November 4
https://github.com/bevry/base
-->

Expand All @@ -23,16 +23,10 @@ Our [Contributing Guide](https://learn.bevry.me/community/contribute) contains u

1. Fork the project and clone your fork - [guide](https://help.github.com/articles/fork-a-repo/)

1. Install local dependencies
1. Setup the project for development

``` bash
npm install
```

1. Perform any other setup operations

``` bash
npm run-script setup
npm run our:setup
```


Expand All @@ -41,7 +35,7 @@ Our [Contributing Guide](https://learn.bevry.me/community/contribute) contains u
1. Compile changes

``` bash
npm run-script compile
npm run our:compile
```

1. Run tests
Expand Down Expand Up @@ -73,9 +67,7 @@ Follow these steps in order to implement your changes/improvements into your des
1. Ensure the project is ready for publishing:

```
git status
git diff
npm run-script prepare
npm run our:release:prepare
```


Expand Down Expand Up @@ -122,15 +114,13 @@ To publish your changes as the project owner:
1. Ensure the project is ready for publishing:

```
git status
git diff
npm run-script prepare
npm run our:release:prepare
```

1. Prepare the release and publish it to npm and git:

``` bash
npm run-script release
npm run our:release
```

> A prompt will occur asking you for a git tag annotation, enter the changelog entry that we created earlier, save and exit the prompt.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ CoffeeScript-Object-Notation. Same as JSON but for CoffeeScript objects.
<li>Executables: <code>cson2json</code>, <code>json2cson</code></li>
<li>Module: <code>require('cson')</code></li></ul>

<h3><a href="https://github.com/bevry/editions" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3>

<p>This package is published with the following editions:</p>

<ul><li><code>cson/source/index.js</code> is Source + CoffeeScript + <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a></li>
<li><code>cson</code> aliases <code>cson/es5/index.js</code></li>
<li><code>cson/es5/index.js</code> is CoffeeScript Compiled + ES5 + <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a></li></ul>

<!-- /INSTALL -->


Expand Down
56 changes: 39 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,48 @@
"engines": {
"node": ">=0.8"
},
"editions": [
{
"description": "Source + CoffeeScript + Require",
"directory": "source",
"entry": "index.js",
"syntaxes": [
"coffeescript",
"require"
]
},
{
"description": "CoffeeScript Compiled + ES5 + Require",
"directory": "es5",
"entry": "index.js",
"syntaxes": [
"javascript",
"es5",
"require"
]
}
],
"main": "es5/index.js",
"bin": {
"cson2json": "bin/cson2json",
"json2cson": "bin/json2cson"
},
"scripts": {
"setup": "npm install",
"clean": "rm -Rf ./docs ./es5",
"compile": "npm run compile:coffeescript",
"compile:coffeescript": "coffee -bco ./es5 ./src",
"meta": "npm run meta:projectz",
"meta:projectz": "projectz compile",
"prepare": "npm run compile && npm run test && npm run meta",
"release": "npm run prepare && npm run release:publish && npm run release:tag && npm run release:push",
"release:publish": "npm publish",
"release:tag": "git tag v$npm_package_version -a",
"release:push": "git push origin master && git push origin --tags",
"pretest": "npm run test:coffeelint",
"test:coffeelint": "coffeelint ./src",
"test": "node --harmony ./es5/test.js"
"our:setup": "npm install",
"our:clean": "rm -Rf ./es5",
"our:compile": "npm run our:compile:coffeescript",
"our:compile:coffeescript": "coffee -bco ./es5 ./source",
"our:meta": "npm run our:meta:projectz",
"our:meta:projectz": "projectz compile",
"our:verify": "npm run our:verify:coffeelint",
"our:verify:coffeelint": "coffeelint ./source",
"our:test": "npm run our:verify && npm test",
"our:release": "npm run our:release:prepare && npm run our:release:publish && npm run our:release:tag && npm run our:release:push",
"our:release:prepare": "npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta",
"our:release:publish": "npm publish",
"our:release:tag": "git tag v$npm_package_version -a",
"our:release:push": "git push origin master && git push origin --tags",
"test": "node --harmony ./es5/test.js --joe-reporter=console"
},
"dependencies": {
"coffee-script": "^1.11.1",
Expand All @@ -99,9 +121,9 @@
"assert-helpers": "^4.4.0",
"biscotto": "2.3.1",
"coffeelint": "^1.16.0",
"joe": "^1.8.0",
"joe-reporter-console": "^1.2.1",
"projectz": "^1.3.0",
"joe": "^2.0.2",
"joe-reporter-console": "^2.0.1",
"projectz": "^1.3.2",
"safeps": "^6.3.0"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f9a383c

Please sign in to comment.