WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 4868aa6

Browse files
committed
Update project structure and dependencies, bump version.
1 parent cd5c05e commit 4868aa6

File tree

13 files changed

+58
-2116
lines changed

13 files changed

+58
-2116
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules/
2-
*.js
3-
*.d.ts
2+
dist/
3+
package-lock.json
4+
*.lock
45
*.log.*
56
*.log
67
*.tgz

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
node_modules/
22
test/
33
src/
4+
package-lock.json
5+
*.lock
46
*.log.*
57
*.log
68
*.tgz

bigfloat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './src/index';

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"name": "bigfloat",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "Fast arbitrary precision math library for computational geometry.",
5-
"main": "dist/bigfloat.js",
6-
"typings": "dist/bigfloat.d.ts",
7-
"browser": "dist/browser.js",
5+
"main": "dist/index.js",
6+
"typings": "dist/index.d.ts",
87
"scripts": {
9-
"prepublish": "tsc -p src && tsc -p src/tsconfig-browser.json",
8+
"prepublish": "tsc -p src && tsc -p src/ts-amd.json && node src/fix-amd.js bigfloat",
109
"test": "tsc -p test && node test/test.js"
1110
},
1211
"author": "Juha Järvi",
@@ -24,6 +23,7 @@
2423
"gmp"
2524
],
2625
"devDependencies": {
27-
"typescript": "^1.8.0-dev.20151204"
26+
"@types/node": "^9.4.6",
27+
"typescript": "^2.7.2"
2828
}
2929
}

src/fix-amd.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var fs = require('fs');
2+
3+
var name = process.argv[2];
4+
var codePath = require('path').resolve(__dirname, '../dist/index-amd.js');
5+
var code = fs.readFileSync(codePath, { encoding: 'utf-8' });
6+
7+
code = code.replace(/\"src\//g, '"' + name + '/');
8+
9+
fs.writeFileSync(codePath, code, { encoding: 'utf-8' });
File renamed without changes.

src/ts-amd.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compileOnSave": true,
3+
"compilerOptions": {
4+
"declaration": false,
5+
"module": "amd",
6+
"moduleResolution": "node",
7+
"noImplicitAny": true,
8+
"noImplicitThis": true,
9+
"outFile": "../dist/index-amd.js",
10+
"removeComments": false,
11+
"sourceMap": false,
12+
"strictNullChecks": true,
13+
"target": "es5",
14+
"types": []
15+
},
16+
"files": [
17+
"../bigfloat.ts"
18+
]
19+
}

src/tsconfig-browser.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/tsconfig.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
2+
"compileOnSave": true,
23
"compilerOptions": {
34
"declaration": true,
45
"module": "commonjs",
6+
"moduleResolution": "node",
57
"noImplicitAny": true,
8+
"noImplicitThis": true,
69
"outDir": "../dist",
7-
"target": "es5"
10+
"removeComments": false,
11+
"sourceMap": false,
12+
"strictNullChecks": true,
13+
"target": "es5",
14+
"types": []
815
},
916
"files": [
10-
"bigfloat.ts"
17+
"index.ts"
1118
]
1219
}

test/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.js
2+
*.d.ts

0 commit comments

Comments
 (0)