Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
fix(deps): Always use latest version of html-sketchapp (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish authored Apr 4, 2018
1 parent da2359e commit 6d059c0
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 22 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
script/src
test
19 changes: 15 additions & 4 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const { promisify } = require('es6-promisify');
const getPort = require('get-port');
const serve = require('serve');
const puppeteer = require('puppeteer');
const { rollup } = require('rollup');
const waitOn = promisify(require('wait-on'));
const mkdirp = promisify(require('mkdirp'));
const fs = require('fs');
const path = require('path');

const readFileAsync = promisify(fs.readFile);
const writeFileAsync = promisify(fs.writeFile);

const configPath = findUp.sync(['html-sketchapp.config.js']);
Expand Down Expand Up @@ -95,9 +95,20 @@ require('yargs')

await page.goto(symbolsUrl, { waitUntil: 'networkidle0' });

const bundlePath = path.resolve(__dirname, '../script/dist/generateAlmostSketch.bundle.js');
const bundle = await readFileAsync(bundlePath, 'utf8');
await page.addScriptTag({ content: bundle });
const bundle = await rollup({
input: path.resolve(__dirname, '../script/generateAlmostSketch.js'),
plugins: [
require('rollup-plugin-node-resolve')(),
require('rollup-plugin-commonjs')()
]
});

const { code } = await bundle.generate({
format: 'iife',
name: 'generateAlmostSketch'
});

await page.addScriptTag({ content: code });

await page.evaluate('generateAlmostSketch.setupSymbols({ name: "html-sketchapp symbols" })');

Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
},
"scripts": {
"lint": "eslint bin script/src test",
"build": "webpack --config script/src/webpack.config.js",
"test": "npm run lint && npm run build && jest",
"test": "npm run lint && jest",
"commit": "git-cz",
"commitmsg": "commitlint --edit --extends seek",
"prepublishOnly": "npm run build",
"travis-deploy-once": "travis-deploy-once",
"semantic-release": "semantic-release"
},
Expand All @@ -42,6 +40,9 @@
"mkdirp": "^0.5.1",
"opn": "^5.1.0",
"puppeteer": "^1.0.0",
"rollup": "^0.57.1",
"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-node-resolve": "^3.3.0",
"serve": "^6.4.9",
"url-join": "^4.0.0",
"wait-on": "^2.1.0",
Expand All @@ -60,8 +61,6 @@
"rimraf": "^2.6.2",
"semantic-release": "^15.1.3",
"traverse": "^0.6.6",
"travis-deploy-once": "^4.3.4",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.12"
"travis-deploy-once": "^4.3.4"
}
}
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": [
"seek"
],
"packageRules": [
{
"packageNames": ["@brainly/html-sketchapp"],
"enabled": true
}
]
}
File renamed without changes.
11 changes: 0 additions & 11 deletions script/src/webpack.config.js

This file was deleted.

0 comments on commit 6d059c0

Please sign in to comment.