Skip to content

Commit

Permalink
Merge pull request #43 from Constantiner/bugfix/issue-42-fix-import-o…
Browse files Browse the repository at this point in the history
…f-particular-utilities

Fix import of particular utilities

Fix #42
  • Loading branch information
Constantiner authored May 29, 2019
2 parents 672fe6d + acd8dcb commit 22be0f8
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/coverage/

#distributive files
/dist/*.*
/esm/*.*
/browser/*.*
*.js
*.mjs
*.map
!rollup.config.js
!babel.config.js
8 changes: 5 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.vscode
node_modules
coverage
dist
esm
browser
browser
*.js
*.mjs
!rollup.config.js
!babel.config.js
18 changes: 9 additions & 9 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@constantiner/fun-ctional",
"version": "0.6.4",
"description": "The library brings most of the familiar functional techniques (like functional composition) to asynchronous world with shining Promises",
"main": "dist/index.js",
"module": "esm/index.js",
"main": "index.js",
"module": "index.mjs",
"scripts": {
"test": "node -r esm scripts/unitTest.js",
"lint": "npx eslint '**/*.js'",
Expand Down Expand Up @@ -58,7 +58,7 @@
"del": "^4.1.1",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-jest": "^22.5.1",
"eslint-plugin-jest": "^22.6.4",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-unicorn": "^8.0.2",
"esm": "^3.2.25",
Expand All @@ -67,7 +67,7 @@
"jest": "^24.8.0",
"lint-staged": "^8.1.7",
"prettier": "^1.17.1",
"rollup": "^1.12.3",
"rollup": "^1.12.4",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-prettier": "^0.6.0",
"rollup-plugin-sourcemaps": "^0.4.2",
Expand Down
10 changes: 6 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ const getUmdOutput = (input, minified = false) => `${getUmdFileName(input)}${min
const config = (format, folder, minified = false) => input => ({
input,
output: {
file: `${folder}/${format === "umd" ? getUmdOutput(input, minified) : getOutput(input, "js")}`,
file: `${folder ? folder + "/" : ""}${
format === "umd" ? getUmdOutput(input, minified) : getOutput(input, format === "es" ? "mjs" : "js")
}`,
format,
sourcemap: true,
sourcemapFile: `${folder}/${getOutput(input, "js")}.map`,
sourcemapFile: `${folder ? folder + "/" : ""}${getOutput(input, format === "es" ? "mjs" : "js")}.map`,
strict: true,
banner: getActualBanner(),
name: format === "umd" ? "funCtional" : undefined
Expand All @@ -67,8 +69,8 @@ const config = (format, folder, minified = false) => input => ({
const sourceFiles = getSourceFilesList();

export default [
...sourceFiles.map(config("cjs", "dist")),
...sourceFiles.map(config("es", "esm")),
...sourceFiles.map(config("cjs")),
...sourceFiles.map(config("es")),
...sourceFiles.map(config("umd", "browser")),
...sourceFiles.map(config("umd", "browser", true))
];
3 changes: 2 additions & 1 deletion scripts/clean.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import del from "del";

const clean = async () => del(["dist", "esm", "browser"]);
const clean = async () =>
del(["browser", "*.js", "*.mjs", "*.map", "!babel.config.js", "!jest.config.js", "!rollup.config.js"]);

// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
Expand Down

0 comments on commit 22be0f8

Please sign in to comment.