Skip to content

Commit

Permalink
Update boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Aug 22, 2017
1 parent dbcfa96 commit 3345b27
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 52 deletions.
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# editorconfig.org
# ╔═╗╔╦╗╦╔╦╗╔═╗╦═╗┌─┐┌─┐┌┐┌┌─┐┬┌─┐
# ║╣ ║║║ ║ ║ ║╠╦╝│ │ ││││├┤ ││ ┬
# o╚═╝═╩╝╩ ╩ ╚═╝╩╚═└─┘└─┘┘└┘└ ┴└─┘
#
# This file (`.editorconfig`) exists to help maintain consistent formatting
# throughout this package, the Sails framework, and the Node-Machine project.
#
# To review what each of these options mean, see:
# http://editorconfig.org/
root = true

[*]
Expand Down
14 changes: 10 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐
// ║╣ ╚═╗║ ║║║║ ║ ├┬┘│
// o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘
// A set of basic conventions designed to complement the .jshintrc file.
// A set of basic conventions (similar to .jshintrc) for use within any
// arbitrary JavaScript / Node.js package -- inside or outside Sails.js.
// For the master copy of this file, see the `.eslintrc` template file in
// the `sails-generate` package (https://www.npmjs.com/package/sails-generate.)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand All @@ -12,8 +13,11 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

"env": {
"node": true,
"mocha": true
"node": true
},

"parserOptions": {
"ecmaVersion": 8
},

"rules": {
Expand All @@ -24,8 +28,9 @@
"eqeqeq": [2, "always"],
"eol-last": [1],
"handle-callback-err": [2],
"indent": [2, 2, {"SwitchCase": 1}],
"indent": [1, 2, {"SwitchCase": 1}],
"linebreak-style": [2, "unix"],
"no-dupe-keys": [2],
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"no-return-assign": [2, "always"],
"no-sequences": [2],
Expand All @@ -34,6 +39,7 @@
"no-unexpected-multiline": [1],
"no-unused-vars": [1],
"one-var": [2, "never"],
"quotes": [1, "single", { "avoidEscape": false, "allowTemplateLiterals": true }],
"semi": [2, "always"]
}

Expand Down
42 changes: 29 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,48 @@
# ┌─┐┬┌┬┐╦╔═╗╔╗╔╔═╗╦═╗╔═╗
# │ ┬│ │ ║║ ╦║║║║ ║╠╦╝║╣
# o└─┘┴ ┴ ╩╚═╝╝╚╝╚═╝╩╚═╚═╝
#
# This file (`.gitignore`) exists to signify to `git` that certain files
# and/or directories should be ignored for the purposes of version control.
#
# This is primarily useful for excluding temporary files of all sorts; stuff
# generated by IDEs, build scripts, automated tests, package managers, or even
# end-users (e.g. file uploads). `.gitignore` files like this also do a nice job
# at keeping sensitive credentials and personal data out of version control systems.
#

############################
# npm
# sails / node.js / npm
############################
node_modules
.tmp
npm-debug.log

package-lock.json
.waterline
.node_history

############################
# tmp, editor & OS files
# editor & OS files
############################
.tmp
*.swo
*.swp
*.swn
*.swm
*.seed
*.log
*.out
*.pid
lib-cov
.DS_STORE
*#
*\#
.\#*
*~
.idea
.netbeans
nbproject


############################
# Tests
# misc
############################
coverage


############################
# Other
############################
.node_history
dump.rdb
4 changes: 4 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
// EVERYTHING ELSE:
//////////////////////////////////////////////////////////////////////

// Allow the use of ES6 features.
// (re ES7, see https://github.com/jshint/jshint/issues/2297)
"esversion": 6,

// Allow the use of `eval` and `new Function()`
// (we sometimes actually need to use these things)
"evil": true,
Expand Down
41 changes: 28 additions & 13 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
*#
.git
./.gitignore
./.jshintrc
./.editorconfig
./.travis.yml
./appveyor.yml
./example
./examples
./test
./tests
./.github

node_modules
ssl
npm-debug.log
.node_history
*.swo
*.swp
*.swn
*.swm
*.seed
*.log
*.out
*.pid
lib-cov
.DS_STORE
*#
*\#
.\#*
*~
.idea
.netbeans
nbproject
test
CONTRIBUTING.md
.git
.gitignore
.tmp
*.swo
*.swp
*.swn
*.swm
.jshintrc
.editorconfig
example
dump.rdb
21 changes: 20 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ╔╦╗╦═╗╔═╗╦ ╦╦╔═╗ ┬ ┬┌┬┐┬ #
# ║ ╠╦╝╠═╣╚╗╔╝║╚═╗ └┬┘││││ #
# o ╩ ╩╚═╩ ╩ ╚╝ ╩╚═╝o ┴ ┴ ┴┴─┘ #
# #
# This file configures Travis CI. #
# (i.e. how we run the tests... mainly) #
# #
# https://docs.travis-ci.com/user/customizing-the-build #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #

language: node_js

node_js:
- "0.10"
- "0.12"
- "4"
- "6"
- "8"
- "node"

branches:
only:
- master

sudo: false
notifications:
email:
- ci@sailsjs.com
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ test_script:
- node --version
- npm --version
# Run the actual tests.
# (note that we skip linting)
- npm run custom-tests
- npm test


# Don't actually build.
Expand Down
23 changes: 5 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,8 @@
"name": "waterline",
"description": "An ORM for Node.js and the Sails framework",
"version": "0.13.1-2",
"homepage": "http://github.com/balderdashy/waterline",
"homepage": "http://waterlinejs.org",
"contributors": [
{
"name": "particlebanana",
"github": "https://github.com/particlebanana"
},
{
"name": "mikermcneil",
"github": "https://github.com/mikermcneil"
},
{
"name": "zolmeister",
"github": "https://github.com/zolmeister"
},
{
"name": "seerepo",
"github": "https://github.com/balderdashy/waterline/graphs/contributors"
Expand Down Expand Up @@ -54,14 +42,13 @@
"test": "npm run custom-tests && nodever=`node -e \"console.log('\\`node -v\\`'[1]);\"` && if [ $nodever != \"0\" ]; then npm run lint; fi",
"custom-tests": "node ./node_modules/mocha/bin/mocha test --recursive",
"lint": "node ./node_modules/eslint/bin/eslint . --max-warnings=0 --ignore-pattern 'test/'",
"prepublish": "npm prune",
"browserify": "rm -rf .dist && mkdir .dist && browserify lib/waterline.js -s Waterline | uglifyjs > .dist/waterline.min.js"
},
"engines": {
"node": ">=0.10.0"
"node": ">=4"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/balderdashy/waterline/issues/new"
}
"url": "https://sailsjs.com/bugs"
},
"license": "MIT"
}
20 changes: 20 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐ ┌─┐┬ ┬┌─┐┬─┐┬─┐┬┌┬┐┌─┐
// ║╣ ╚═╗║ ║║║║ ║ ├┬┘│ │ │└┐┌┘├┤ ├┬┘├┬┘│ ││├┤
// o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘ └─┘ └┘ └─┘┴└─┴└─┴─┴┘└─┘
// ┌─ ┌─┐┌─┐┬─┐ ┌─┐┬ ┬┌┬┐┌─┐┌┬┐┌─┐┌┬┐┌─┐┌┬┐ ┌┬┐┌─┐┌─┐┌┬┐┌─┐ ─┐
// │ ├┤ │ │├┬┘ ├─┤│ │ │ │ ││││├─┤ │ ├┤ ││ │ ├┤ └─┐ │ └─┐ │
// └─ └ └─┘┴└─ ┴ ┴└─┘ ┴ └─┘┴ ┴┴ ┴ ┴ └─┘─┴┘ ┴ └─┘└─┘ ┴ └─┘ ─┘
// > An .eslintrc configuration override for use with the tests in this directory.
//
// (See .eslintrc in the root directory of this package for more info.)

"extends": [
"../.eslintrc"
],

"env": {
"mocha": true
}

}

0 comments on commit 3345b27

Please sign in to comment.