mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 13:32:28 -05:00
Merge pull request #1 from fsih/addTravis
Add travis testing and deploy
This commit is contained in:
commit
ef19e6f37e
6 changed files with 47 additions and 7 deletions
|
@ -1,2 +1,3 @@
|
|||
node_modules/*
|
||||
build/*
|
||||
playground/
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -4,3 +4,7 @@
|
|||
# NPM
|
||||
/node_modules
|
||||
npm-*
|
||||
|
||||
# Build
|
||||
playground/*
|
||||
build/*
|
||||
|
|
29
.travis.yml
Normal file
29
.travis.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
dist: trusty
|
||||
node_js:
|
||||
- 6
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
env:
|
||||
global:
|
||||
- NODE_ENV=production
|
||||
install:
|
||||
- npm --production=false install
|
||||
- npm --production=false update
|
||||
before_deploy:
|
||||
- git config --global user.email $(git log --pretty=format:"%ae" -n1)
|
||||
- git config --global user.name $(git log --pretty=format:"%an" -n1)
|
||||
deploy:
|
||||
- provider: script
|
||||
on:
|
||||
all_branches: true
|
||||
condition: $TRAVIS_BRANCH != master
|
||||
skip_cleanup: true
|
||||
script: npm run deploy -- -x -e $TRAVIS_BRANCH -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||
- provider: script
|
||||
on:
|
||||
branch: master
|
||||
skip_cleanup: true
|
||||
script: npm run --silent deploy -- -x -a -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"name": "scratch-blobs",
|
||||
"version": "0.1.0",
|
||||
"description": "GraphicaL User Interface for the Scratch 3.0 paint editor, which is used to make and edit sprites for use in projects.",
|
||||
"description": "Graphical User Interface for the Scratch 3.0 paint editor, which is used to make and edit sprites for use in projects.",
|
||||
"main": "./src/index.js",
|
||||
"scripts": {
|
||||
"build": "npm run clean && webpack --progress --colors --bail",
|
||||
"clean": "rimraf ./build && mkdirp build",
|
||||
"deploy": "touch playground/.nojekyll && gh-pages -t -d playground -m \"Build for $(git log --pretty=format:%H -n1)\"",
|
||||
"lint": "eslint . --ext .js,.jsx",
|
||||
"start": "webpack-dev-server",
|
||||
"test": "npm run lint && npm run build",
|
||||
|
@ -13,10 +14,10 @@
|
|||
},
|
||||
"author": "Massachusetts Institute of Technology",
|
||||
"license": "BSD-3-Clause",
|
||||
"homepage": "https://github.com/fsih/scratch-blobs#readme",
|
||||
"homepage": "https://github.com/LLK/scratch-paint#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/fsih/scratch-blobs.git"
|
||||
"url": "git+ssh://git@github.com/LLK/scratch-paint.git"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^15",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import PaintEditorComponent from './components/paint-editor.jsx';
|
||||
|
||||
export {PaintEditorComponent as default};
|
||||
export default PaintEditorComponent;
|
||||
|
|
|
@ -76,5 +76,10 @@ module.exports = {
|
|||
template: 'src/playground/index.ejs',
|
||||
title: 'Scratch 3.0 Paint Editor'
|
||||
})
|
||||
]
|
||||
].concat(process.env.NODE_ENV === 'production' ? [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
include: /\.min\.js$/,
|
||||
minimize: true
|
||||
})
|
||||
] : [])
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue