Skip to content

Commit

Permalink
chore: add universal module definition for webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
danielduarte committed May 24, 2022
1 parent e19ee89 commit 54b050a
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/web/flowed.js
/dist/
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ module.exports = {
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/no-empty-function': 0,
eqeqeq: 1,
quotes: ['error', 'single', { avoidEscape: true }],
},
};
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flowed",
"version": "1.14.4",
"version": "1.14.5",
"description": "A fast and reliable flow engine for orchestration and more uses in *Node.js*, *Deno* and the browser",
"keywords": [
"flow",
Expand Down Expand Up @@ -28,7 +28,7 @@
"coverage": "nyc report",
"coverage:send": "nyc report --reporter=text-lcov | coveralls",
"posttest": "npm run lint",
"lint": "eslint src test --ext .js,.jsx,.ts,.tsx",
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "npm run lint -- --fix && prettier --write \"src/**/*.ts\" && prettier --write \"test/**/*.ts\"",
"release:prepare": "./ops/updateSonarProps.sh && rm -rf ./dist ./node_modules package-lock.json && npm install && npm run lint:fix && npm run build && npm run bundle && npm test && git status",
"test:size": "npm-consider install --test",
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.organization=danielduarte
sonar.projectKey=danielduarte_flowed
sonar.projectName=Flowed
sonar.projectVersion=1.14.4
sonar.projectVersion=1.14.5

sonar.sources=src
sonar.sourceEncoding=UTF-8
2 changes: 1 addition & 1 deletion test/load-from-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('can run a flow', function () {

throw new Error('An error should have been thrown');
} catch (err) {
expect((err as Error).message).to.be.eql(`Protocol not supported: ftp. Supported protocols are: [http, https]`);
expect((err as Error).message).to.be.eql('Protocol not supported: ftp. Supported protocols are: [http, https]');
}
});

Expand Down
2 changes: 1 addition & 1 deletion test/resolver-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ describe('the ResolverLibrary', () => {
msg = (err as Error).message;
}

expect(msg).to.be.eql(`Task resolver 'r' for task 'aTask' has no definition. Defined custom resolvers are: [x].`);
expect(msg).to.be.eql("Task resolver 'r' for task 'aTask' has no definition. Defined custom resolvers are: [x].");
});

it('can create base resolver task', async () => {
Expand Down
2 changes: 1 addition & 1 deletion web/flowed.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
const path = require('path');

module.exports = {
mode: "production",
target: ["web", "es5"],
mode: 'production',
target: ['web', 'es5'],
entry: './dist/index.js',
output: {
filename: 'flowed.js',
path: path.resolve(__dirname, 'web'),
library: "Flowed",
library: {
name: 'Flowed',
type: 'umd',
},
},
resolve: {
fallback: {
Expand Down

0 comments on commit 54b050a

Please sign in to comment.