Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono repo setup #31

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6949fa5
added load & save functions
kuldeepkeshwar Jun 14, 2019
e4d39f7
updated snapshot
kuldeepkeshwar Jun 14, 2019
36f2622
added option to write stats to disk
kuldeepkeshwar Jun 14, 2019
344ea91
included files deleted in last build
kuldeepkeshwar Jun 17, 2019
304a4d0
updated test snapshot
kuldeepkeshwar Jun 20, 2019
c8f0bcb
write diff file for bot
kuldeepkeshwar Jun 21, 2019
e9963a3
removed writeToDisk and added webpack mode
kuldeepkeshwar Jun 23, 2019
0824ac2
updated test
kuldeepkeshwar Jun 25, 2019
c75b96e
Add support for size-plugin-bot
kuldeepkeshwar Jul 26, 2019
58cef5b
fix typo in comments
kuldeepkeshwar Jul 26, 2019
ea124be
reverted files ext
kuldeepkeshwar Jul 26, 2019
ae9d2fa
update comments
kuldeepkeshwar Jul 26, 2019
1a095b0
remove publish option default value as true
kuldeepkeshwar Aug 2, 2019
65ba82d
Update src/index.mjs
kuldeepkeshwar Aug 6, 2019
560057f
Update index.mjs
kuldeepkeshwar Aug 6, 2019
52ac7ac
changes from upstream
kuldeepkeshwar Aug 22, 2019
a46740d
Update README.md
kuldeepkeshwar Aug 22, 2019
5a30895
Merge branch 'master' into master
kuldeepkeshwar Aug 22, 2019
191cb2a
fixes #28 & remove pull_request_number
kuldeepkeshwar Aug 24, 2019
9429289
move publish logic in a new pkg size-plugin-store
kuldeepkeshwar Aug 27, 2019
b3b24a8
delete yarn lock
kuldeepkeshwar Aug 27, 2019
3ab2edf
fix: empty size*.json file
kuldeepkeshwar Aug 30, 2019
12389e0
move common logic to size-plugin-core
kuldeepkeshwar Sep 2, 2019
2956e62
update readme
kuldeepkeshwar Sep 2, 2019
23c7d9c
update docs for compression option
kuldeepkeshwar Sep 2, 2019
6caf0d2
correct docs
kuldeepkeshwar Sep 2, 2019
3fc927d
update SizePluginCore syntax
kuldeepkeshwar Sep 7, 2019
42a528b
update size-plugin-store version
kuldeepkeshwar Sep 8, 2019
735f944
update size-plugin-core version
kuldeepkeshwar Sep 14, 2019
46028ca
update size-plugin-core version
kuldeepkeshwar Oct 4, 2019
8c7b6d3
Update package.json
kuldeepkeshwar Oct 4, 2019
37b0161
update size-plugin-core version
kuldeepkeshwar Oct 18, 2019
f1aba04
lerna init
kuldeepkeshwar Oct 31, 2019
35a7166
import pkg from kuldeepkeshwar/size-plugin-core
kuldeepkeshwar Oct 31, 2019
ac0618a
add top level commands
kuldeepkeshwar Oct 31, 2019
d1c1956
update size-plugin version
kuldeepkeshwar Oct 31, 2019
0c447d2
move travis config to top
kuldeepkeshwar Oct 31, 2019
c6acb25
Merge remote-tracking branch 'upstream/master' into mono-repo-setup
kuldeepkeshwar Oct 31, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 61 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
node_modules
dist
package-lock.json
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock
# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
</p>

> 🙋 Using Rollup? Check out the [rollup-plugin-size](https://github.com/luwes/rollup-plugin-size) port.
>
> 🙋‍♂ Using CI ? Check out [size-plugin-bot](https://github.com/kuldeepkeshwar/size-plugin-bot) 🤖 to automate intergation with CI

## Installation

Expand Down Expand Up @@ -62,6 +64,7 @@ module.exports = {
#### Parameters

- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `options.compression` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** compression method(gzip/brotli) to use, default: 'gzip'
- `options.pattern` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** minimatch pattern of files to track
- `options.exclude` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** minimatch pattern of files NOT to track
- `options.filename` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** file name to save filesizes to disk
Expand Down
11 changes: 11 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"packages": ["packages/*"],
"useWorkspaces":true,
"npmClient": "yarn",
"command": {
"bootstrap": {
"npmClientArgs": ["--no-package-lock"]
}
},
"version": "independent"
}
76 changes: 10 additions & 66 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,14 @@
{
"name": "size-plugin",
"version": "2.0.1",
"description": "Tracks your Webpack asset sizes over time.",
"main": "dist/size-plugin.js",
"module": "src/index.mjs",
"source": "src/index.mjs",
"scripts": {
"build": "microbundle -f cjs --target node --no-compress",
"doc": "documentation readme src/index.mjs -a public --section Options",
"prepare": "npm run -s build",
"test": "jest --coverage",
"release": "npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
},
"files": [
"src",
"dist"
"private": true,
"workspaces": [
"packages/*"
],
"keywords": [
"webpack plugin",
"file size",
"gzip size",
"bundle size"
],
"eslintConfig": {
"extends": "developit"
},
"babel": {
"presets": [
"env"
]
},
"jest": {
"testEnvironment": "node",
"moduleFileExtensions": [
"mjs",
"js",
"json"
],
"transform": {
"^.+\\.m?js$": "babel-jest"
},
"coverageReporters": [
"text"
],
"collectCoverageFrom": [
"src/**/*"
],
"watchPathIgnorePatterns": [
"node_modules",
"dist"
]
"scripts": {
"build": "lerna run build",
"doc": "lerna run doc",
"prepare": "lerna run prepare",
"test": "lerna run test"
},
"author": "Jason Miller <[email protected]>",
"license": "Apache-2.0",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-jest": "^23.6.0",
Expand All @@ -62,21 +18,9 @@
"eslint-config-developit": "^1.1.1",
"fs-extra": "^7.0.1",
"jest": "^23.6.0",
"lerna": "^3.16.4",
"microbundle": "^0.11.0",
"webpack": "^4.41.2"
},
"dependencies": {
"axios": "^0.19.0",
"chalk": "^2.4.2",
"ci-env": "^1.9.0",
"escape-string-regexp": "^1.0.5",
"glob": "^7.1.4",
"gzip-size": "^5.1.1",
"minimatch": "^3.0.4",
"pretty-bytes": "^5.3.0",
"util.promisify": "^1.0.0"
},
"peerDependencies": {
"webpack": "*"
}
"name": "size-plugin"
}
61 changes: 61 additions & 0 deletions packages/size-plugin-core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock
# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
Loading