add package files and build config

- npm
- bower
- budo: dev server
- browserify: asset bundler
- bannerify: add banner to dist files
- jshint: project style prefs
- editorconfig: whitespace prefs
pull/1/head
Chad von Nau 2015-11-07 19:08:05 -08:00
rodzic 87ee41e248
commit a5e7ce7678
7 zmienionych plików z 88 dodań i 1 usunięć

16
.editorconfig 100644
Wyświetl plik

@ -0,0 +1,16 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{package.json,bower.json,.jshintrc}]
indent_size = 2
[.gitmodules]
indent_style = tab

2
.gitignore vendored 100644
Wyświetl plik

@ -0,0 +1,2 @@
node_modules
npm-debug.log

10
.jshintrc 100644
Wyświetl plik

@ -0,0 +1,10 @@
{
"esnext": true,
"browser": true,
"browserify": true,
"devel": true,
"globals": {
"AudioContext": true,
"webkitAudioContext": true
}
}

6
banner.txt 100644
Wyświetl plik

@ -0,0 +1,6 @@
/**
* @name <%= pkg.name %>
* @version <%= pkg.version %> | <%= moment().format('MMMM Do YYYY') %>
* @author <%= pkg.author %>
* @license <%= pkg.license %>
*/

22
bower.json 100644
Wyświetl plik

@ -0,0 +1,22 @@
{
"name": "woscope",
"version": "0.0.1",
"description": "oscilloscope emulator",
"homepage": "https://m1el.github.io/woscope/",
"license": "MIT",
"main": "dist/woscope.js",
"keywords": [
"oscilloscope",
"webgl"
],
"authors": [
"m1el"
],
"ignore": [
"**/.*"
],
"moduleType": [
"globals",
"node"
]
}

Wyświetl plik

@ -16,7 +16,7 @@ noscript, .nogl { position: absolute; width: 800px; padding-top: 200px;
text-align: center; font-size: 32px; } text-align: center; font-size: 32px; }
footer { text-align: center; font-size: 18px; } footer { text-align: center; font-size: 18px; }
</style> </style>
<script src="all.js" data-fix-firefox=true> </script> <script src="dist/demo.js" data-fix-firefox=true> </script>
<script> <script>
// I refuse to replace `let` with `var`s // I refuse to replace `let` with `var`s
if (!('audioCtx' in window) && navigator.userAgent.match(/Firefox/)) { if (!('audioCtx' in window) && navigator.userAgent.match(/Firefox/)) {

31
package.json 100644
Wyświetl plik

@ -0,0 +1,31 @@
{
"name": "woscope",
"version": "0.0.1",
"description": "oscilloscope emulator",
"homepage": "https://m1el.github.io/woscope/",
"license": "MIT",
"main": "index.js",
"keywords": [
"oscilloscope",
"webgl"
],
"author": "m1el",
"repository": {
"type": "git",
"url": "git+https://github.com/m1el/woscope.git"
},
"bugs": {
"url": "https://github.com/m1el/woscope/issues"
},
"scripts": {
"lint": "jshint *.js demo/*.js",
"demo": "budo demo/:dist/demo.js --live --open",
"build": "browserify demo/ > dist/demo.js; browserify index.js --standalone woscope -p [bannerify --file banner.txt] > dist/woscope.js"
},
"devDependencies": {
"bannerify": "^1.0.1",
"browserify": "^12.0.1",
"budo": "^6.0.1",
"jshint": "^2.8.0"
}
}