Skip to content

Commit

Permalink
Merge branch 'master' into processPeaks
Browse files Browse the repository at this point in the history
  • Loading branch information
endurance21 authored Jun 1, 2020
2 parents 7579400 + b3e61a3 commit 59dbfc5
Show file tree
Hide file tree
Showing 72 changed files with 3,683 additions and 2,960 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Gruntfile.js
test/test.js
webpack.config.js
lib/
68 changes: 12 additions & 56 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,67 +13,23 @@
"Float32Array": true,
"Uint8Array": true
},
"extends": ["eslint:recommended", "prettier"],
"plugins": ["prettier"],
"rules": {
"block-scoped-var": 0,
"camelcase": 0,
"comma-style": [
2,
"last"
],
"dot-notation": [
"prettier/prettier": ["error"],
"no-cond-assign": [2, "except-parens"],
"eqeqeq": ["error", "smart"],
"no-use-before-define": [
2,
{
"allowKeywords": true
"functions": false
}
],
"eqeqeq": [
2,
"allow-null"
],
"eol-last": ["error", "always"],
"guard-for-in": 2,
"indent": ["error", 2, { "SwitchCase": 1 }],
"max-len": [1, 120, 2, { "ignoreComments": true }],
"new-cap": 2,
"new-cap": 0,
"no-caller": 2,
"no-cond-assign": [
2,
"except-parens"
],
"no-debugger": 2,
"no-empty": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-parens": 2,
"no-extra-semi": 2,
"no-irregular-whitespace": 2,
"no-trailing-spaces": 2,
"no-iterator": 2,
"no-loop-func": 0,
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }],
"no-multi-str": 2,
"no-new": 2,
"no-plusplus": 0,
"no-proto": 2,
"no-script-url": 2,
"no-sequences": 2,
"no-shadow": 2,
"no-undef": 2,
"no-unused-vars": 2,
"no-with": 2,
"quotes": [
2,
"single"
],
"semi": [
2
],
"space-before-blocks": "error",
"strict": 2,
"valid-typeof": 2,
"wrap-iife": [
2,
"inside"
]
"no-undef": 0,
"no-unused-vars": ["error", { "args": "none" }],
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-console": "off"
}
}
28 changes: 28 additions & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Gruntfile.js
webpack.config.js
lib/
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
17 changes: 13 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ module.exports = function(grunt) {
// Configure style consistency
eslint: {
source: {
options: {configFile: './.eslintrc'},
options: {
configFile: './.eslintrc',
fix: true
},
src: ['src/**/*.js', 'test/tests/**/*.js']
}
},
Expand Down Expand Up @@ -53,19 +56,25 @@ module.exports = function(grunt) {
hostname: '*'
}
}
}
},
githooks: {
all: {
'pre-commit':'lint' //runs linting test before every git commit
}
}
});


grunt.loadNpmTasks('grunt-webpack');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-decomment');
grunt.loadNpmTasks('grunt-githooks');

grunt.registerTask('lint', ['eslint:source']);
grunt.registerTask('default', ['webpack:prod', 'decomment']);
grunt.registerTask('dev', ['connect','webpack:dev', 'decomment']);
grunt.registerTask('dev', ['eslint','connect','webpack:dev', 'decomment']);
grunt.registerTask('serve', 'connect:server:keepalive');
grunt.registerTask('run-tests', ['serve', 'open']);
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Interactive documentation at [p5js.org/reference/#/libraries/p5.sound](http://p5

### Latest Build
* Visit http://p5js.org/download/ for the latest official release of p5 with the latest p5.sound included.
* The sound library [here](https://github.com/therewasaguy/p5.sound/blob/master/lib) is updated more frequently, and we occasionally offer new [releases](https://github.com/processing/p5.js-sound/releases) before p5's release cycle.
* The sound library [here](https://github.com/processing/p5.js-sound/blob/master/lib) is updated more frequently, and we occasionally offer new [releases](https://github.com/processing/p5.js-sound/releases) before p5's release cycle.


### Contribute
Expand Down
4 changes: 2 additions & 2 deletions fragments/before.frag
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
* </li>
* <li><a href="#/p5/userStartAudio">userStartAudio</a>: Enable audio in a
* browser- and user-friendly way.</a>
* <p>p5.sound is on <a href="https://github.com/therewasaguy/p5.sound/">GitHub</a>.
* <p>p5.sound is on <a href="https://github.com/processing/p5.js-sound/">GitHub</a>.
* Download the latest version
* <a href="https://github.com/therewasaguy/p5.sound/blob/master/lib/p5.sound.js">here</a>.</p>
* <a href="https://github.com/processing/p5.js-sound/blob/master/lib/p5.sound.js">here</a>.</p>
*
* @module p5.sound
* @submodule p5.sound
Expand Down
Loading

0 comments on commit 59dbfc5

Please sign in to comment.