Skip to content

Commit

Permalink
Improve, test, and clean up the Gruntfile.js.
Browse files Browse the repository at this point in the history
Full `grunt` build is now 42s (on MBP 2016).
Remove unused NPM packages.
Gruntfile comments.
  • Loading branch information
ronyeh committed Jan 13, 2022
1 parent f90033f commit 69f0419
Show file tree
Hide file tree
Showing 14 changed files with 291 additions and 336 deletions.
403 changes: 243 additions & 160 deletions Gruntfile.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Go try out [The VexFlow Tutorial](https://github.com/0xfe/vexflow/wiki/Tutorial)

## Quick Start

### Using NPM
### Using npm

To install version 4.0.0-beta:

Expand Down
2 changes: 1 addition & 1 deletion docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2>Quick Start</h2>
</a>

<a href="#using-npm" id="using-npm" style="color: inherit; text-decoration: none;">
<h3>Using NPM</h3>
<h3>Using npm</h3>
</a>
<p>To install version 4.0.0-beta:</p>
<pre><code class="language-shell"><span class="hl-0">$ npm install vexflow@beta</span>
Expand Down
163 changes: 16 additions & 147 deletions package-lock.json

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

8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,17 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"fork-ts-checker-webpack-plugin": "^6.5.0",
"glob": "^7.2.0",
"grunt": "^1.4.1",
"grunt-bump": "^0.8.0",
"grunt-cli": "^1.4.3",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-concat": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-qunit": "^5.1.1",
"grunt-eslint": "^24.0.0",
"grunt-open": "^0.2.4",
"grunt-webpack": "^5.0.0",
"jsdom": "^19.0.0",
"jspdf": "^2.5.0",
"npm": "^8.3.0",
"opener": "^1.5.2",
"opentype.js": "^1.3.4",
"prettier": "^2.5.1",
"puppeteer": "^13.0.1",
Expand All @@ -121,8 +118,7 @@
"test": "grunt test",
"reference": "grunt reference",
"test:reference": "grunt test:reference",
"test:reference:cache": "grunt test:reference:cache",
"postinstall": "grunt clean:webpack_cache"
"test:reference:cache": "grunt test:reference:cache"
},
"homepage": "https://vexflow.com/",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const VERSION: string = '4.0.0';
export const ID: string = '7f3fa41601f3e6a06be349323d4090a6800fa395';
export const DATE: string = '2022-01-12T04:19:02.804Z';
export const ID: string = 'cfeb5d56d816856bddd7234054e3afa52b0f1e8a';
export const DATE: string = '2022-01-13T08:12:43.593Z';
5 changes: 0 additions & 5 deletions tools/esm/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions tools/esm/package.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// Author: Ron B. Yeh

// node ./tools/esm/fix-imports-and-exports.js ./build/esm/
// node ./tools/fix-esm-imports.mjs ./build/esm/
// See the `build:esm` task in Gruntfile.js.

// Used by Gruntfile.js to add .js extensions to all imports and exports under the `vexflow/build/esm/` directory.
// ES module import statements do not work without the .js extension.

// This script recursively walks `build/esm/` and fixes imports & exports in every JS file.
// It adds a .js extension to every import / export of a file, fixing files in place. For example:
// import { Fraction } from './fraction'; => import { Fraction } from './fraction.js';
Expand Down
2 changes: 2 additions & 0 deletions tools/generate_images.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ const appMain = async () => {
const { numTests, pptrJobs, ver } = resolveJobsOption(childArgs.ver);
const { imageDir, args } = childArgs;

console.log(numTests, pptrJobs, ver);

const backendDefs = {
jsdom: {
path: './tools/generate_png_images.js',
Expand Down
3 changes: 0 additions & 3 deletions tools/generate_png_images.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ global.document = dom.window.document;

const [scriptDir, imageDir] = process.argv.slice(2, 4);

console.log('Script Dir:', scriptDir);
console.log('Image Dir:', imageDir);

const runOptions = {
jobs: 1,
job: 0,
Expand Down
Loading

0 comments on commit 69f0419

Please sign in to comment.