Skip to content

Commit

Permalink
Update to version v1.0.0-0
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadSawalhy committed Sep 14, 2020
1 parent 66182ce commit f37fed6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ module/
main/
node_modules/
.vscode/
./src/version.js
22 changes: 13 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ const CJS_DEST = './main';

gulp.task("update-version-file", ()=>{

const FILE_PATH = './src/version.js';
const fileName = 'version.js';
const VERSION = pkg.version;
const CODE = [
const ESM_CODE = [
"// this file is auto generated",
"// the current version is:",
"export default \"" + VERSION + "\";",
].join('\n');

const CJS_CODE = [
"// this file is auto generated",
"// the current version is:",
"module.exports = \"" + VERSION + "\";",
].join('\n');
return new Promise((res) => {
fs.writeFileSync(path.resolve(__dirname, FILE_PATH), CODE);
fs.writeFileSync(path.resolve(ESM_DEST, fileName), ESM_CODE);
fs.writeFileSync(path.resolve(CJS_DEST, fileName), CJS_CODE);
res('version file updated!');
});

Expand Down Expand Up @@ -56,8 +61,7 @@ gulp.task("clean", ()=>{
});

gulp.task("build", gulp.series([
'update-version-file',
'clean',
gulp.parallel(['build:cjs', 'build:esm']),
])
);
'clean',
'update-version-file',
gulp.parallel(['build:cjs', 'build:esm']),
]));
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rakam",
"version": "0.1.0",
"version": "1.0.0-0",
"description": "Intense math library. God willing, we won't stop developing it, we will be so happy when you contribute to make this library eligible for all needs and uses.",
"main": "main",
"module": "module",
Expand All @@ -19,13 +19,12 @@
"homepage": "https://github.com/scicave/rakam#readme",
"scripts": {
"build": "gulp build && rollup -c",
"prod": "npm run prepare && npm run build",
"prod": "npm run lint && npm run build && npm run test",
"prepare": "npm run lint && npm run test",
"lint": "eslint src/ --fix",
"test": "jest",
"test:watch": "jest --watch",
"preversion": "npm run prepare",
"postversion": "npm run build"
"preversion": "npm run prod"
},
"jest": {
"verbose": true,
Expand Down
2 changes: 1 addition & 1 deletion src/geometry/angles/angles-extend.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { trunc } from "../../../core/index.js";
import trunc from "../../core/trunc.js";

export const angleTypes = {
RAD: 'rad',
Expand Down
5 changes: 2 additions & 3 deletions src/version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// this file is auto generated
// the current version is:
export default "0.1.0";
// this file will be auto filled by gulp "genrate-version-file" task.
export default "ourversion"; // this is just a placeholder

0 comments on commit f37fed6

Please sign in to comment.