Skip to content

Commit 1ed8b9f

Browse files
committed
Add npm scripts
1 parent 436b104 commit 1ed8b9f

17 files changed

Lines changed: 41 additions & 5 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.idea/
2+
node_modules/
3+
package-lock.json

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
language: node_js
22
node_js: node
3+
cache: npm
4+
5+
branches:
6+
only:
7+
- development
38

49
install:
5-
- npm install --global eslint csslint htmllint-cli
10+
- npm install
611

712
script:
8-
- eslint --max-warnings=0 script.js
9-
- csslint style.css
10-
- htmllint index.html
13+
- npm run lint
14+
15+
deploy:
16+
provider: script
17+
script: npm run deploy
18+
skip_cleanup: true
19+
on:
20+
branch: development

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ascoderu.github.io
22

3-
[![Travis CI status](https://api.travis-ci.org/ascoderu/ascoderu.github.io.svg?branch=master)](https://travis-ci.org/ascoderu/ascoderu.github.io)
3+
[![Travis CI status](https://api.travis-ci.org/ascoderu/ascoderu.github.io.svg?branch=development)](https://travis-ci.org/ascoderu/ascoderu.github.io)
44

55
Public information site for Ascoderu, hosted via Github-Pages and Cloudflare at [ascoderu.ca](https://ascoderu.ca).
66

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "ascoderu.github.io",
3+
"version": "1.0.0",
4+
"description": " ",
5+
"author": "Clemens Wolff",
6+
"license": "Apache-2.0",
7+
"private": true,
8+
"scripts": {
9+
"deploy": "gh-pages --silent --dist src --branch master --repo \"https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}\"",
10+
"lint.css": "csslint src/style.css",
11+
"lint.html": "htmllint src/index.html",
12+
"lint.js": "eslint --max-warnings=0 src/script.js",
13+
"lint": "run-s lint.html lint.css lint.js",
14+
"start": "reload --browser --dir src"
15+
},
16+
"devDependencies": {
17+
"csslint": "^1.0.5",
18+
"eslint": "^6.3.0",
19+
"gh-pages": "^2.1.1",
20+
"htmllint-cli": "^0.0.7",
21+
"npm-run-all": "^4.1.5",
22+
"reload": "^3.0.1"
23+
}
24+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)