Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Merge d3d75c6 into d576e5c
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Oct 28, 2016
2 parents d576e5c + d3d75c6 commit 0d0d4f6
Show file tree
Hide file tree
Showing 38 changed files with 182 additions and 435 deletions.
14 changes: 13 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,17 @@
"plugins": [
"transform-runtime",
"meteor-imports"
]
],
"env": {
"coverage": {
"plugins": [
["istanbul", {
"exclude": [
"build/meteor/**/*.js",
"test/**/*.js"
]
}]
]
}
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
node_modules
build
errorShots
coverage
.nyc_output
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ before_install:
- sudo mv docker-compose /usr/local/bin
- curl https://install.meteor.com/ | sh
- docker run -p 27017:27017 --detach mongo:3.2.8

script:
- npm test -- --mochaOpts.grep "hot reloading"
- npm run coverage
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Crater

[![Build Status](https://travis-ci.org/jcoreio/crater.svg?branch=master)](https://travis-ci.org/jcoreio/crater)
[![Coverage Status](https://coveralls.io/repos/github/jcoreio/crater/badge.svg?branch=coverage-fixed)](https://coveralls.io/github/jcoreio/crater?branch=modules) (doesn't include client-side code yet)

## A new app skeleton for Meteor/React

Expand Down
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"prod:debug-brk": "babel-node scripts/prod-debug-brk.js",
"pretest": "babel-node scripts/pretest.js",
"test": "wdio wdio.conf.js",
"coverage": "BABEL_ENV=coverage nyc --reporter=lcov --reporter=text --show-process-tree npm test",
"test:dev": "wdio wdio.conf.js --mochaOpts.grep dev",
"test:prod": "wdio wdio.conf.js --mochaOpts.grep prod",
"test:docker": "wdio wdio.conf.js --mochaOpts.grep docker",
Expand Down Expand Up @@ -47,11 +48,13 @@
"description": "Meteor(/React) app skeleton that runs your app code with pure Webpack/Babel instead of isobuild",
"devDependencies": {
"assets-webpack-plugin": "^3.4.0",
"async-child-process": "^1.0.0",
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",
"babel-eslint": "^6.1.2",
"babel-loader": "^6.2.5",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-istanbul": "^2.0.3",
"babel-plugin-meteor-imports": "^1.0.3",
"babel-plugin-transform-runtime": "^6.12.0",
"babel-preset-es2015": "^6.14.0",
Expand All @@ -61,6 +64,8 @@
"babel-preset-stage-1": "^6.13.0",
"babel-register": "^6.14.0",
"chai": "^3.5.0",
"coveralls": "^2.11.14",
"crater-util": "^1.1.1",
"cross-spawn": "^4.0.0",
"css-loader": "^0.24.0",
"dotenv": "^2.0.0",
Expand All @@ -79,11 +84,13 @@
"glob": "^7.0.6",
"happypack": "^2.2.1",
"http-proxy": "^1.14.0",
"istanbul": "^0.4.5",
"json-loader": "^0.5.4",
"meteor-imports-webpack-plugin": "^1.1.0",
"mkdirp": "^0.5.1",
"mocha": "^3.0.2",
"node-inspector": "^0.12.8",
"nyc": "^8.3.2",
"phantomjs-prebuilt": "^2.1.12",
"postcss-loader": "^0.9.1",
"postcss-modules-values": "^1.2.2",
Expand Down Expand Up @@ -119,5 +126,13 @@
"bugs": {
"url": "https://github.com/jedwards1211/crater/issues"
},
"homepage": "https://github.com/jedwards1211/crater#readme"
"homepage": "https://github.com/jedwards1211/crater#readme",
"nyc": {
"include": [
"src/**/*.js",
"scripts/**/*.js"
],
"sourceMap": false,
"instrument": false
}
}
4 changes: 2 additions & 2 deletions scripts/build-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// @flow

import path from 'path'
import asyncScript from './util/asyncScript'
import isNewerThan from './util/isNewerThan'
import asyncScript from 'crater-util/lib/asyncScript'
import isNewerThan from 'crater-util/lib/isNewerThan'
import webpack from 'webpack'
import webpackConfig from '../webpack/webpack.config.prod'
import promisify from 'es6-promisify'
Expand Down
8 changes: 4 additions & 4 deletions scripts/build-docker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env babel-node
// @flow

import asyncScript from './util/asyncScript'
import execAsync from './util/execAsync'
import spawnAsync from './util/spawnAsync'
import asyncScript from 'crater-util/lib/asyncScript'
import execAsync from 'crater-util/lib/execAsync'
import spawnAsync from 'crater-util/lib/spawnAsync'
import path from 'path'
import build from './build'
import buildDir from '../buildDir'
Expand All @@ -13,7 +13,7 @@ const root = path.resolve(__dirname, '..')
process.on('SIGINT', (): any => process.exit(1))

const opts = {
cwd: path.resolve(__dirname, '..'),
cwd: root,
stdio: 'inherit'
}

Expand Down
6 changes: 3 additions & 3 deletions scripts/build-meteor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import path from 'path'
import glob from 'glob'
import rimraf from 'rimraf'
import mkdirp from 'mkdirp'
import asyncScript from './util/asyncScript'
import isNewerThan from './util/isNewerThan'
import spawnAsync from './util/spawnAsync'
import asyncScript from 'crater-util/lib/asyncScript'
import isNewerThan from 'crater-util/lib/isNewerThan'
import spawnAsync from 'crater-util/lib/spawnAsync'
import promisify from 'es6-promisify'
import buildDir from '../buildDir'

Expand Down
6 changes: 3 additions & 3 deletions scripts/build-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import path from 'path'
import mkdirp from 'mkdirp'
import asyncScript from './util/asyncScript'
import isNewerThan from './util/isNewerThan'
import spawnAsync from './util/spawnAsync'
import asyncScript from 'crater-util/lib/asyncScript'
import isNewerThan from 'crater-util/lib/isNewerThan'
import spawnAsync from 'crater-util/lib/spawnAsync'
import webpack from 'webpack'
import webpackConfig from '../webpack/webpack.config.server'
import promisify from 'es6-promisify'
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env babel-node
// @flow

import asyncScript from './util/asyncScript'
import asyncScript from 'crater-util/lib/asyncScript'
import buildMeteor from './build-meteor'
import buildServer from './build-server'
import buildClient from './build-client'
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug-brk.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @flow

import start from './start'
import spawn from './util/spawn'
import spawn from 'crater-util/lib/spawn'
import path from 'path'

process.on('SIGINT', (): any => process.exit(1))
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @flow

import start from './start'
import spawn from './util/spawn'
import spawn from 'crater-util/lib/spawn'
import path from 'path'

process.on('SIGINT', (): any => process.exit(1))
Expand Down
6 changes: 3 additions & 3 deletions scripts/docker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env babel-node
// @flow

import asyncScript from './util/asyncScript'
import execAsync from './util/execAsync'
import spawnAsync from './util/spawnAsync'
import asyncScript from 'crater-util/lib/asyncScript'
import execAsync from 'crater-util/lib/execAsync'
import spawnAsync from 'crater-util/lib/spawnAsync'
import path from 'path'

const root = path.resolve(__dirname, '..')
Expand Down
4 changes: 2 additions & 2 deletions scripts/installMeteorDeps.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env babel-node
// @flow

import spawnAsync from './util/spawnAsync'
import isDirectory from './util/isDirectory'
import spawnAsync from 'crater-util/lib/spawnAsync'
import isDirectory from 'crater-util/lib/isDirectory'
import path from 'path'
import buildDir from '../buildDir'

Expand Down
4 changes: 2 additions & 2 deletions scripts/pretest.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /usr/bin/env babel-node
// @flow

import asyncScript from './util/asyncScript'
import spawnAsync from './util/spawnAsync'
import asyncScript from 'crater-util/lib/asyncScript'
import spawnAsync from 'crater-util/lib/spawnAsync'

process.on('SIGINT', (): any => process.exit(1))

Expand Down
2 changes: 1 addition & 1 deletion scripts/prod-debug-brk.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @flow

import prod from './prod'
import spawn from './util/spawn'
import spawn from 'crater-util/lib/spawn'
import path from 'path'

process.on('SIGINT', (): any => process.exit(1))
Expand Down
2 changes: 1 addition & 1 deletion scripts/prod-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @flow

import prod from './prod'
import spawn from './util/spawn'
import spawn from 'crater-util/lib/spawn'
import path from 'path'

process.on('SIGINT', (): any => process.exit(1))
Expand Down
9 changes: 6 additions & 3 deletions scripts/prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// @flow

import launch from 'smart-restart'
import asyncScript from './util/asyncScript'
import spawnAsync from './util/spawnAsync'
import asyncScript from 'crater-util/lib/asyncScript'
import spawnAsync from 'crater-util/lib/spawnAsync'
import buildMeteor from './build-meteor'
import installMeteorDeps from './installMeteorDeps'
import path from 'path'
Expand Down Expand Up @@ -58,13 +58,16 @@ async function prod(options?: {commandOptions?: Array<string>} = {}): Promise<an
launch({
main: path.join(buildDir, 'index.js'),
commandOptions: options.commandOptions || [],
usePolling: !!process.env.CI,
interval: 1000,
})
}

export default prod

if (!module.parent) {
process.on('SIGINT', (): any => process.exit(1))
process.on('SIGINT', (): any => process.exit(0))
process.on('SIGTERM', (): any => process.exit(0))
asyncScript(prod, {
exitOnSuccess: false,
})
Expand Down
7 changes: 5 additions & 2 deletions scripts/start.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env babel-node
// @flow

import asyncScript from './util/asyncScript'
import asyncScript from 'crater-util/lib/asyncScript'
import path from 'path'
import buildMeteor from './build-meteor'
import installMeteorDeps from './installMeteorDeps'
Expand All @@ -22,13 +22,16 @@ async function start(options?: {commandOptions?: Array<any>} = {}): Promise<any>
launch({
commandOptions: options.commandOptions || [],
main: path.join(src, 'index.js'),
usePolling: !!process.env.CI,
interval: 1000,
})
}

export default start

if (!module.parent) {
process.on('SIGINT', (): any => process.exit(1))
process.on('SIGINT', (): any => process.exit(0))
process.on('SIGTERM', (): any => process.exit(0))
asyncScript(start, {
exitOnSuccess: false,
})
Expand Down
14 changes: 0 additions & 14 deletions scripts/util/asyncScript.js

This file was deleted.

21 changes: 0 additions & 21 deletions scripts/util/exec.js

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/util/execAsync.js

This file was deleted.

19 changes: 0 additions & 19 deletions scripts/util/getMaxMtime.js

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/util/isDirectory.js

This file was deleted.

Loading

0 comments on commit 0d0d4f6

Please sign in to comment.