-
Notifications
You must be signed in to change notification settings - Fork 20
/
package.json
58 lines (58 loc) · 4.85 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"name": "hashmark",
"version": "0.0.0-development",
"description": "Take contents of a file (or stdin), and output as new file with a hash in the name",
"license": "MIT",
"author": "Keith Cirkel (http://keithcirkel.co.uk)",
"main": "index.js",
"bin": {
"hashmark": "./bin/hashmark"
},
"repository": {
"type": "git",
"url": "http://github.com/keithamus/hashmark.git"
},
"scripts": {
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"test": "for i in $(seq 1 21); do rm -rf testdir; npm run test$i; done",
"test1": "echo Foo | ./bin/hashmark 'test.{hash}.js' && rm test.3eae1599bb7f187b86d6427942d172ba8dd7ee5962aab03e0839ad9d59c37eb0.js",
"test2": "echo Foo | ./bin/hashmark -l 8 'test.{hash}.js' && rm test.3eae1599.js",
"test3": "echo Bar | ./bin/hashmark -l 8 'test.{hash}.js' && rm test.842c8886.js",
"test4": "echo Bar | ./bin/hashmark --length 8 'test.{hash}.js' && rm test.842c8886.js",
"test5": "echo Foo | ./bin/hashmark -d md5 'test.{hash}.js' && rm test.cbd8f7984c654c25512e3d9241ae569f.js",
"test6": "echo Foo | ./bin/hashmark --digest md5 '{hash}.js' && rm cbd8f7984c654c25512e3d9241ae569f.js",
"test7": "echo Foo | ./bin/hashmark -d md5 -l 8 'test.{hash}.js' && rm test.cbd8f798.js",
"test8": "echo Bar | ./bin/hashmark -d md5 -l 8 'test.{hash}.js' && rm test.962d3beb.js",
"test9": "echo Foo > test.js && ./bin/hashmark -d md5 -l 8 test.js 'test.{hash}' && rm test.js test.cbd8f798",
"test10": "echo Test1 > test.js && echo Test2 > test2.js && ./bin/hashmark -d md5 -l 4 'test*.js' '{name}-{hash}{ext}' && rm test.js test2.js test-fa02.js test2-856b.js",
"test11": "echo Test1 > test.js && echo Test2 > test2.js && ./bin/hashmark -l 4 'test*.js' '{name}-{hash}{ext}' -m testmap.json && rm test.js test2.js test-7e5e.js test2-1a65.js testmap.json",
"test12": "echo Test1 | ./bin/hashmark -l 4 -n test.js '{name}-{hash}{ext}' && rm test-7e5e.js",
"test13": "echo abracadabra > test.js && ./bin/hashmark -d md5 -l 8 -r test.js '{name}-{hash}{ext}' && test ! -f test.js && rm test-97640ef5.js",
"test14": "mkdir -p testdir/sub && echo Test1 > testdir/sub/test.js && echo Test2 > test2.js && ./bin/hashmark -d md5 -l 4 'testdir/**/*.js' 'test*.js' '{name}-{hash}{ext}' && rm testdir/sub/test.js test2.js test-fa02.js test2-856b.js && rmdir -p testdir/sub",
"test15": "mkdir -p testdir/sub && echo Test1 > testdir/sub/test.js && echo Test2 > testdir/sub/test2.js && ./bin/hashmark -d md5 -l 4 --cwd 'testdir' 'sub/*.js' '{dir}/{name}-{hash}{ext}' && rm testdir/sub/test.js testdir/sub/test2.js testdir/sub/test-fa02.js testdir/sub/test2-856b.js && rmdir -p testdir/sub",
"test16": "echo Foo > test.js && ./bin/hashmark -d md5 -l 8 test.js '{hash}-{base}' && rm test.js cbd8f798-test.js",
"test17": "mkdir -p testdir/sub/nested && echo Test1 > testdir/sub/test.js && echo Test2 > testdir/sub/test2.js && ./bin/hashmark -d md5 -l 4 --cwd 'testdir' 'sub/*' '{dir}/{name}-{hash}{ext}' && rm testdir/sub/test.js testdir/sub/test2.js testdir/sub/test-fa02.js testdir/sub/test2-856b.js && rmdir -p testdir/sub/nested",
"test18": "mkdir -p testdir/sub && echo 'Test --cwd without {dir} in pattern' > testdir/sub/test.js && echo Test2 > testdir/sub/test2.js && ./bin/hashmark -d md5 -l 4 --cwd 'testdir/sub' '*' '{name}-{hash}{ext}' && rm testdir/sub/test.js testdir/sub/test2.js testdir/sub/test-84c5.js testdir/sub/test2-856b.js && rmdir -p testdir/sub",
"test19": "mkdir -p testdir/sub && echo 'Test --cwd and --asset-map' > testdir/sub/test.js && ./bin/hashmark -l 4 --cwd 'testdir/sub' --asset-map assets.json '*' '{name}-{hash}{ext}' && (grep -e '\"test\\.js\":\\s*\"test-7068.js\"' testdir/sub/assets.json || (echo '\nWrong content in asset-map file' 1>&2; exit 1)) && rm testdir/sub/assets.json && rm -rf testdir",
"test20": "mkdir -p testdir/sub/subsub && echo 'Test --cwd and --asset-map with existing map' > testdir/sub/subsub/test.js && echo '{\"existing\": \"some-file.js\"}' > testdir/sub/assets.json && ./bin/hashmark -l 4 --cwd 'testdir/sub' --asset-map assets.json 'subsub/*' 'subsub/{name}-{hash}{ext}' && ((grep -e '\"subsub/test\\.js\":\\s*\"subsub/test-f8fa.js\"' testdir/sub/assets.json && grep -e '\"existing\":\\s*\"some-file\\.js\"' testdir/sub/assets.json) || (echo '\nWrong content in asset-map file' 1>&2; exit 1)) && rm testdir/sub/assets.json && rm -rf testdir",
"test21": "echo 'Create and write file if the directory does not exist' | ./bin/hashmark 'newtestdir/newtestsubdir/test.{hash}.js' && rm -rf newtestdir"
},
"config": {
"ghooks": {
"commit-msg": "validate-commit-msg"
}
},
"dependencies": {
"cli": "^1.0.0",
"mkdirp": "^0.5.1"
},
"devDependencies": {
"ghooks": "^2.0.0",
"semantic-release": "^6.3.2",
"travis-after-all": "^1.4.4",
"validate-commit-msg": "^2.13.0"
},
"engines": {
"node": ">=4"
}
}