Skip to content

Commit

Permalink
Modernize things a bit- after all, it's been four years. Specifically…
Browse files Browse the repository at this point in the history
…, this brings in conventional boilerplate files.
  • Loading branch information
mikermcneil committed Dec 20, 2016
1 parent 9f033d9 commit ae5ccfb
Show file tree
Hide file tree
Showing 11 changed files with 865 additions and 588 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ╔═╗╔╦╗╦╔╦╗╔═╗╦═╗┌─┐┌─┐┌┐┌┌─┐┬┌─┐
# ║╣ ║║║ ║ ║ ║╠╦╝│ │ ││││├┤ ││ ┬
# 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

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
55 changes: 39 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
lib-cov
# ┌─┐┬┌┬┐╦╔═╗╔╗╔╔═╗╦═╗╔═╗
# │ ┬│ │ ║║ ╦║║║║ ║╠╦╝║╣
# 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.
#

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

############################
# editor & OS files
############################
*.swo
*.swp
*.swn
*.swm
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

pids
logs
results

npm-debug.log

.\#*
*#
node_modules
ssl
lib-cov
.DS_STORE
*#
*\#
.\#*
*~
.idea
nbproject
.netbeans
nbproject

############################
# misc
############################
.tmp
dump.rdb
130 changes: 130 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
// ┬┌─┐╦ ╦╦╔╗╔╔╦╗┬─┐┌─┐
// │└─┐╠═╣║║║║ ║ ├┬┘│
// o└┘└─┘╩ ╩╩╝╚╝ ╩ ┴└─└─┘
//
// This file (`.jshintrc`) exists to help with consistency of code
// throughout this package, and throughout Sails and the Node-Machine project.
//
// To review what each of these options mean, see:
// http://jshint.com/docs/options
//
// (or: https://github.com/jshint/jshint/blob/master/examples/.jshintrc)



//////////////////////////////////////////////////////////////////////
// NOT SUPPORTED IN SOME JSHINT VERSIONS SO LEAVING COMMENTED OUT:
//////////////////////////////////////////////////////////////////////
// Prevent overwriting prototypes of native classes like `Array`.
// (doing this is _never_ ok in any of our packages that are intended
// to be used as dependencies of other developers' modules and apps)
// "freeze": true,
//////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////
// EVERYTHING ELSE:
//////////////////////////////////////////////////////////////////////

// Allow the use of `eval` and `new Function()`
// (we sometimes actually need to use these things)
"evil": true,

// Tolerate funny-looking dashes in RegExp literals.
// (see https://github.com/jshint/jshint/issues/159#issue-903547)
"regexdash": true,

// The potential runtime "Environments" (as defined by jshint)
// that the _style_ of code written in this package should be
// compatible with (not the code itself, of course).
"browser": true,
"node": true,
"wsh": true,

// Tolerate the use `[]` notation when dot notation would be possible.
// (this is sometimes preferable for readability)
"sub": true,

// Do NOT suppress warnings about mixed tabs and spaces
// (two spaces always, please; see `.editorconfig`)
"smarttabs": false,

// Suppress warnings about trailing whitespace
// (this is already enforced by the .editorconfig, so no need to warn as well)
"trailing": false,

// Suppress warnings about the use of expressions where fn calls or assignments
// are expected, and about using assignments where conditionals are expected.
// (while generally a good idea, without this setting, JSHint needlessly lights up warnings
// in existing, working code that really shouldn't be tampered with. Pandora's box and all.)
"expr": true,
"boss": true,

// Do NOT suppress warnings about using functions inside loops
// (in the general case, we should be using iteratee functions with `_.each()`
// or `Array.prototype.forEach()` instead of `for` or `while` statements
// anyway. This warning serves as a helpful reminder.)
"loopfunc": false,

// Suppress warnings about "weird constructions"
// i.e. allow code like:
// ```
// (new (function OneTimeUsePrototype () { } ))
// ```
//
// (sometimes order of operations in JavaScript can be scary. There is
// nothing wrong with using an extra set of parantheses when the mood
// strikes or you get "that special feeling".)
"supernew": true,

// Do NOT allow backwards, node-dependency-style commas.
// (while this code style choice was used by the project in the past,
// we have since standardized these practices to make code easier to
// read, albeit a bit less exciting)
"laxcomma": false,

// Do NOT allow avant garde use of commas in conditional statements.
// (this prevents accidentally writing code like:
// ```
// if (!_.contains(['+ci', '-ci', '∆ci', '+ce', '-ce', '∆ce']), change.verb) {...}
// ```
// See the problem in that code? Neither did we-- that's the problem!)
"nocomma": true,

// Strictly enforce the consistent use of single quotes.
// (this is a convention that was established primarily to make it easier
// to grep [or FIND+REPLACE in Sublime] particular string literals in
// JavaScript [.js] files. Note that JSON [.json] files are, of course,
// still written exclusively using double quotes around key names and
// around string literals.)
"quotmark": "single",

// Do NOT suppress warnings about the use of `==null` comparisons.
// (please be explicit-- use Lodash or `require('util')` and call
// either `.isNull()` or `.isUndefined()`)
"eqnull": false,

// Strictly enforce the use of curly braces with `if`, `else`, and `switch`
// as well as, much less commonly, `for` and `while` statements.
// (this is just so that all of our code is consistent, and to avoid bugs)
"curly": true,

// Strictly enforce the use of `===` and `!==`.
// (this is always a good idea. Check out "Truth, Equality, and JavaScript"
// by Angus Croll [the author of "If Hemmingway Wrote JavaScript"] for more
// explanation as to why.)
"eqeqeq": true,

// Allow initializing variables to `undefined`.
// For more information, see:
// • https://jslinterrors.com/it-is-not-necessary-to-initialize-a-to-undefined
// • https://github.com/jshint/jshint/issues/1484
//
// (it is often very helpful to explicitly clarify the initial value of
// a local variable-- especially for folks new to more advanced JavaScript
// and who might not recognize the subtle, yet critically important differences between our seemingly
// between `null` and `undefined`, and the impact on `typeof` checks)
"-W080": true

}
34 changes: 34 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.git
./.gitignore
./.jshintrc
./.editorconfig
./.travis.yml
./appveyor.yml
./example
./examples
./test
./tests
./.github

node_modules
npm-debug.log
.node_history
*.swo
*.swp
*.swn
*.swm
*.seed
*.log
*.out
*.pid
lib-cov
.DS_STORE
*#
*\#
.\#*
*~
.idea
.netbeans
nbproject
.tmp
dump.rdb
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ╔╦╗╦═╗╔═╗╦ ╦╦╔═╗ ┬ ┬┌┬┐┬ #
# ║ ╠╦╝╠═╣╚╗╔╝║╚═╗ └┬┘││││ #
# 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"
- "5"
- "6"
- "7"
- "node"

branches:
only:
- master

notifications:
email:
- [email protected]
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,3 @@ var user = $$(User).find(17);
```


[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/c87267eee787dd508d0106260261b6dc "githalytics.com")](http://githalytics.com/mikermcneil/parley)
47 changes: 47 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# # # # # # # # # # # # # # # # # # # # # # # # # #
# ╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╦╔═╗╦═╗ ┬ ┬┌┬┐┬ #
# ╠═╣╠═╝╠═╝╚╗╔╝║╣ ╚╦╝║ ║╠╦╝ └┬┘││││ #
# ╩ ╩╩ ╩ ╚╝ ╚═╝ ╩ ╚═╝╩╚═o ┴ ┴ ┴┴─┘ #
# #
# This file configures Appveyor CI. #
# (i.e. how we run the tests on Windows) #
# #
# https://www.appveyor.com/docs/lang/nodejs-iojs/ #
# # # # # # # # # # # # # # # # # # # # # # # # # #


# Test against these versions of Node.js.
environment:
matrix:
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "4"
- nodejs_version: "5"
- nodejs_version: "6"
- nodejs_version: "7"

# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js
# (Not sure what this is for, it's just in Appveyor's example.)
- ps: Install-Product node $env:nodejs_version
# Install declared dependencies
- npm install


# Post-install test scripts.
test_script:
# Output Node and NPM version info.
# (Presumably just in case Appveyor decides to try any funny business?
# But seriously, always good to audit this kind of stuff for debugging.)
- node --version
- npm --version
# Run the actual tests.
- npm test


# Don't actually build.
# (Not sure what this is for, it's just in Appveyor's example.
# I'm not sure what we're not building... but I'm OK with not
# building it. I guess.)
build: off
Loading

0 comments on commit ae5ccfb

Please sign in to comment.