Skip to content

Commit 697ffae

Browse files
committed
Merge pull request #1 from briancavalier/add-suggestions
Simplify setup, add failing test, code coverage
2 parents d5868f7 + 10f0fea commit 697ffae

File tree

6 files changed

+40
-26
lines changed

6 files changed

+40
-26
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
22
.idea/
3+
coverage/

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
# mostjs package-starter
22

3+
A starting point for new `@most` packages.
4+
35
## Usage
46

5-
At you bash/zsh command line;
6-
Replacing `your-package-name` with the actual name of your awesome new library.
7+
### Get it
8+
79
```shell
8-
$ git clone https://github.com/mostjs/package-starter
9-
$ rm -rf .git
10+
$ git clone https://github.com/mostjs/package-starter my-awesome-package
11+
$ cd my-awesome-package
12+
$ rm -rf ./.git
13+
$ git init
1014
$ npm install
11-
$ mv src/mostPackage.js src/your-package-name.js
12-
$ mv test/mostPackage.js test/your-package-name.js
13-
$ sed -i 's/mostPackage/your-package-name-here/g' package.json
15+
$ sed -i 's/mostPackage/my-awesome-package/g' package.json
1416
```
17+
18+
### Use it
19+
1520
In your editor:
1621

1722
1. Add a description of your awesome package and

package.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
{
22
"name": "@most/mostPackage",
3-
"version": "0.0.0",
4-
"description": "",
5-
"main": "mostPackage.js",
3+
"version": "1.0.0",
4+
"description": "mostPackage",
5+
"main": "dist/mostPackage.js",
66
"files": [
77
"dist/mostPackage.js"
88
],
9-
"directories": {},
109
"scripts": {
11-
"build-dist": "mkdir -p dist && rollup src/mostPackage.js | babel --presets es2015 --plugins transform-es2015-modules-umd --module-id '@most/mostPackage' -o dist/mostPackage.js",
10+
"build-dist": "mkdir -p dist && rollup src/index.js | babel --presets es2015 --plugins transform-es2015-modules-umd --module-id '@most/mostPackage' -o dist/mostPackage.js",
1211
"build": "npm run build-dist && uglifyjs dist/mostPackage.js -o dist/mostPackage.min.js",
1312
"prepublish": "npm run build",
1413
"preversion": "npm run build",
15-
"unit-test": "mocha -r babel-register",
14+
"unit-test": "babel-node ./node_modules/.bin/isparta cover _mocha",
1615
"lint": "jscs -x src && jsinspect src && eslint src",
1716
"test": "npm run lint && npm run unit-test"
1817
},
1918
"repository": {
2019
"type": "git",
2120
"url": "git+https://github.com/mostjs/mostPackage.git"
2221
},
23-
"author": "Tylor Steinberger <tlsteinberger167@gmail.com> (github.com/TylorS)",
22+
"author": "Your Name <you@wherever.com> (github.com/<you>)",
2423
"license": "MIT",
2524
"bugs": {
2625
"url": "https://github.com/mostjs/mostPackage/issues"
@@ -33,13 +32,16 @@
3332
"babel-eslint": "^4.1.8",
3433
"babel-plugin-transform-es2015-modules-umd": "^6.5.0",
3534
"babel-preset-es2015": "^6.5.0",
36-
"babel-register": "^6.5.0",
3735
"eslint": "^1.10.3",
36+
"isparta": "^4.0.0",
3837
"jscs": "^2.9.0",
3938
"jsinspect": "^0.7.2",
4039
"mocha": "^2.4.5",
4140
"most": "^0.18.0",
4241
"rollup": "^0.25.3",
4342
"uglify-js": "^2.6.1"
43+
},
44+
"peerDependencies": {
45+
"most": "^0.18.0"
4446
}
4547
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/** @license MIT License (c) copyright 2016 original author or authors */
22

3-
import {} from '@most/core'
3+
// import {...} from 'most';
4+
5+
export default x => x;

test/index-test.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/** @license MIT License (c) copyright 2016 original author or authors */
2+
3+
import {describe, it} from 'mocha';
4+
import assert from 'assert';
5+
6+
import awesome from '../src/index';
7+
8+
// TODO: Write more tests
9+
10+
describe('@most/mostPackage', () => {
11+
it('should be awesome', () => {
12+
assert(awesome(true));
13+
});
14+
});

test/mostPackage.js

-10
This file was deleted.

0 commit comments

Comments
 (0)