Skip to content

Commit

Permalink
rewrite for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
adriano-tirloni committed Jul 18, 2022
1 parent 0ffae75 commit a8588bf
Show file tree
Hide file tree
Showing 190 changed files with 50 additions and 2,093 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/resolve-patch-46f9469d0d-5656f4d0be.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 📃GOOGLE FONT CSS 2
## A Javascript package to integrate with Google Fonts API.

⚠️ *If you were using the v1 of this package check the new API below, it is slightly different. *
#### A Javascript package to integrate with Google Fonts API.

This is a package with a **single purpose**: To provide an easy interface to create the latest version of a Google Fonts CSS2 URL.

Expand Down
1 change: 0 additions & 1 deletion package.js

This file was deleted.

9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,10 @@
},
"scripts": {
"release": "yarn build:dev && yarn build:prod",
"build": "rollup -c -m && bash ./postbuild"
"build": "rollup -c && bash ./postbuild"
},
"devDependencies": {
"@babel/core": "^7.18.9",
"@babel/preset-env": "^7.18.9",
"babel-loader": "^8.2.5",
"rollup": "^2.77.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-terser": "^7.0.2"
},
"files": [
Expand Down
78 changes: 21 additions & 57 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
import { terser } from "rollup-plugin-terser";

//Consts
const isProduction = process.env.NODE_ENV === 'production'
const outputFileName = 'index'
const outputFile = isProduction ? "./dist/prod.js" : "./dist/dev.js";
const name = 'GoogleFontsCSS2'

//Other
Expand All @@ -17,22 +15,6 @@ if (fs.existsSync("./dist") && fs.readdirSync("./dist").length){
fs.rmSync("./dist", {recursive: true, force: true});
}

const exportConfig = ({ minify, config }) => {

return {
input: './src/index.js',
...config,
output: {
...config.output,
file: `${config.output.file}${minify ? '.min.js' : '.js'}`,
banner,
},
plugins: [
minify && terser()
]
}
}

export default [
exportConfig({
minify: false,
Expand All @@ -43,7 +25,8 @@ export default [
exports: 'named',
preferConst: true,
}
}}),
}
}),
exportConfig({
minify: true,
config: {
Expand All @@ -53,7 +36,8 @@ export default [
exports: 'named',
preferConst: true,
}
}}),
}
}),
exportConfig({
minify: false,
config: {
Expand All @@ -62,43 +46,23 @@ export default [
format: 'umd',
name
},
}}),
// {
// // ES5
// input: './src/main.js',
// plugins: [
// getBabelOutputPlugin({
// presets: ['@babel/preset-env']
// })
// ],
// output: {
// file: './build/bundle-es5.js',
// format: 'cjs',
// name
// }
// }
}
})
];


// export default {
// input: 'src/index.js',
// output: [
// {
// file: outputFile,
// format: 'cjs',
// exports: 'named',
// sourcemap: true,
// strict: false
// }
// ],
// plugins: [
// replace({
// "process.env.NODE_ENV": JSON.stringify(NODE_ENV)
// }),
// babel({
// exclude: "node_modules/**",
// presets: ["@babel/preset-env"],
// })
// ],
// external: []
// }
function exportConfig ({ minify, config }) {

return {
input: './src/index.js',
...config,
output: {
...config.output,
file: `${config.output.file}${minify ? '.min.js' : '.js'}`,
banner,
},
plugins: [
minify && terser()
]
}
}
Loading

0 comments on commit a8588bf

Please sign in to comment.