-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maint: Upgrade to Patternslib v4 final.
- Loading branch information
Showing
14 changed files
with
261 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"parserPreset": "conventional-changelog-conventionalcommits", | ||
"rules": { | ||
"body-leading-blank": [1, "always"], | ||
"footer-leading-blank": [1, "always"], | ||
"subject-empty": [2, "never"], | ||
"type-case": [2, "always", "lower-case"], | ||
"type-empty": [2, "never"], | ||
"type-enum": [2, "always", ["feat", "fix", "maint", "breaking"]] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
[*] | ||
indent_style = space | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
[*.js] | ||
[*{js,jsx,vue,ts}] | ||
indent_size = 4 | ||
|
||
[{*.css,*.scss,*.xml,*.html}] | ||
[*.{css,scss,xml,html,yml}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14' | ||
- run: npm install yarn | ||
- run: make check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.DS_Store | ||
node_modules | ||
stamp-npm | ||
package-lock.json | ||
stamp-yarn | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"tabWidth": 4, | ||
"quoteProps": "consistent" | ||
"quoteProps": "consistent", | ||
"printWidth": 89 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"npm": { | ||
"publish": true | ||
}, | ||
"git": { | ||
"requireBranch": "master", | ||
"commitMessage": "maint(Release): Release new version." | ||
}, | ||
"plugins": { | ||
"@release-it/conventional-changelog": { | ||
"infile": "CHANGES.md", | ||
"preset": { | ||
"name": "conventionalcommits", | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes" | ||
}, | ||
{ | ||
"type": "maint", | ||
"section": "Maintenance" | ||
}, | ||
{ | ||
"type": "breaking", | ||
"section": "Breaking Changes" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,83 @@ | ||
all:: designerhappy | ||
ESLINT ?= npx eslint | ||
YARN ?= npx yarn | ||
|
||
|
||
stamp-npm: package.json | ||
npm install | ||
touch stamp-npm | ||
define get_package_var | ||
$(shell node -p "require('./package.json').$(1)") | ||
endef | ||
PACKAGE_NAME := $(shell node -p "'$(call get_package_var,name)'.replace('@patternslib/', '')") | ||
PACKAGE_VERSION := $(call get_package_var,version) | ||
|
||
|
||
clean:: | ||
rm -rf stamp-npm node_modules | ||
stamp-yarn: | ||
$(YARN) install | ||
# Install pre commit hook | ||
$(YARN) husky install | ||
touch stamp-yarn | ||
|
||
|
||
designerhappy:: stamp-npm | ||
printf "\n\n Designer, you can be happy now.\n Go to http://localhost:8000 to see the demo \n\n\n\n" | ||
npm run start | ||
clean-dist: | ||
rm -Rf dist/ | ||
|
||
|
||
.PHONY: clean | ||
clean: clean-dist | ||
rm -f stamp-yarn | ||
rm -Rf node_modules/ | ||
|
||
|
||
eslint: stamp-yarn | ||
$(ESLINT) ./src | ||
|
||
|
||
.PHONY: check | ||
check:: stamp-yarn eslint | ||
$(YARN) run test | ||
|
||
|
||
.PHONY: bundle | ||
bundle: stamp-yarn | ||
$(YARN) run build | ||
|
||
|
||
release-web: clean-dist bundle | ||
@echo name is $(PACKAGE_NAME) | ||
@echo version is $(PACKAGE_VERSION) | ||
tar -czf ./$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz dist --transform s/dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ | ||
git clone -n git@github.com:Patternslib/Patterns-releases.git --depth 1 ./dist/Patterns-releases | ||
mkdir ./dist/Patterns-releases/releases | ||
mv ./$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz ./dist/Patterns-releases/releases/ | ||
cd ./dist/Patterns-releases && \ | ||
git reset HEAD && \ | ||
git add ./releases/$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz && \ | ||
git commit -m"Add release $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz" && \ | ||
git push | ||
|
||
|
||
.PHONY: release-major | ||
release-major: check | ||
npx release-it major --dry-run --ci && \ | ||
npx release-it major --ci && \ | ||
make release-web | ||
|
||
|
||
.PHONY: release-minor | ||
release-minor: check | ||
npx release-it minor --dry-run --ci && \ | ||
npx release-it minor --ci && \ | ||
make release-web | ||
|
||
|
||
.PHONY: release-patch | ||
release-patch: check | ||
npx release-it --dry-run --ci && \ | ||
npx release-it --ci && \ | ||
make release-web | ||
|
||
|
||
.PHONY: serve | ||
serve:: stamp-yarn | ||
$(YARN) run start | ||
|
||
|
||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import registry from "patternslib/src/core/registry.js"; | ||
import registry from "@patternslib/patternslib/src/core/registry.js"; | ||
import "./src/pat-content-mirror.js"; | ||
|
||
|
||
registry.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
rootDir: "./src", | ||
setupFilesAfterEnv: ["<rootDir>/setupTests.js"], | ||
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"], | ||
transform: { | ||
"^.+\\.[t|j]sx?$": "babel-jest", | ||
}, | ||
moduleNameMapper: { | ||
"\\.(css|less|sass|scss)$": "identity-obj-proxy", | ||
}, | ||
transformIgnorePatterns: ["/node_modules/(?!.*patternslib/*).+\\.[t|j]sx?$"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,73 @@ | ||
{ | ||
"name": "pat-content-mirror", | ||
"version": "1.0.0", | ||
"description": "A pattern for rich comments in the social stream.", | ||
"author": { | ||
"name": "Fulvio Casali", | ||
"email": "fulviocasali@gmail.com" | ||
}, | ||
"homepage": "https://gitub.com/ploneintranet/pat-content-mirror", | ||
"docs": "https://gitub.com/ploneintranet/pat-content-mirror", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:ploneintranet/pat-content-mirror.git" | ||
}, | ||
"main": "./src/pat-content-mirror.js", | ||
"dependencies": { | ||
"patternslib": "https://github.com/Patternslib/Patterns#master" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-optional-chaining": "^7.11.0", | ||
"@babel/preset-env": "^7.9.6", | ||
"babel-eslint": "^10.1.0", | ||
"babel-loader": "^8.1.0", | ||
"core-js": "3", | ||
"eslint": "^7.0.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"prettier": "^2.1.2", | ||
"regenerator-runtime": "^0.13.5", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.10.3" | ||
}, | ||
"scripts": { | ||
"start": "webpack-dev-server --config webpack.config.js --open --env.NODE_ENV=development", | ||
"build": "webpack --config webpack.config.js --env.NODE_ENV=production" | ||
}, | ||
"browserslist": [ | ||
">0.2%", | ||
"ie >= 11", | ||
"not dead" | ||
], | ||
"maintainers": [ | ||
{ | ||
"name": "Syslab.com GmbH", | ||
"email": "info@syslab.com", | ||
"url": "http://www.syslab.com" | ||
"name": "pat-content-mirror", | ||
"version": "1.0.0", | ||
"description": "A pattern for content-mirror", | ||
"author": { | ||
"name": "Syslab GesmbH", | ||
"email": "dev@syslab.com" | ||
}, | ||
"license": "MIT", | ||
"homepage": "https://gitub.com/ploneintranet/pat-content-mirror", | ||
"main": "./src/content-mirror.js", | ||
"dependencies": { | ||
"@patternslib/patternslib": "4" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.13.15", | ||
"@babel/eslint-parser": "^7.13.14", | ||
"@babel/plugin-proposal-optional-chaining": "^7.11.0", | ||
"@babel/preset-env": "^7.9.6", | ||
"@commitlint/cli": "^12.1.1", | ||
"@commitlint/config-conventional": "^12.1.1", | ||
"@release-it/conventional-changelog": "^2.0.1", | ||
"@testing-library/jest-dom": "^5.11.10", | ||
"babel-loader": "^8.1.0", | ||
"clean-webpack-plugin": "^3.0.0", | ||
"copy-webpack-plugin": "^6.2.0", | ||
"core-js": "3", | ||
"css-loader": "^3.5.3", | ||
"duplicate-package-checker-webpack-plugin": "^3.0.0", | ||
"eslint": "^7.0.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"expose-loader": "^0.7.5", | ||
"file-loader": "^6.2.0", | ||
"husky": "^6.0.0", | ||
"identity-obj-proxy": "^3.0.0", | ||
"imports-loader": "^0.8.0", | ||
"jest": "^26.6.3", | ||
"jest-watch-typeahead": "^0.6.2", | ||
"prettier": "^2.1.2", | ||
"raw-loader": "^4.0.1", | ||
"regenerator-runtime": "^0.13.5", | ||
"release-it": "^14.6.1", | ||
"sass": "^1.32.8", | ||
"sass-loader": "^10.1.1", | ||
"style-loader": "^1.2.1", | ||
"svg-inline-loader": "^0.8.2", | ||
"terser-webpack-plugin": "^2.3.6", | ||
"webpack": "^4.43.0", | ||
"webpack-bundle-analyzer": "^3.9.0", | ||
"webpack-cli": "^3.3.12", | ||
"webpack-dev-server": "^3.11.2", | ||
"webpack-modernizr-loader": "^5.0.0", | ||
"whybundled": "^2.0.0", | ||
"yarn": "^1.22.10" | ||
}, | ||
"scripts": { | ||
"start": "webpack-dev-server --config webpack.config.js --mode=development", | ||
"watch": "webpack --config webpack.config.js --watch --mode=development", | ||
"build": "webpack --config webpack.config.js --mode=production", | ||
"build:stats": "webpack --config webpack.config.js --mode=development --json > stats.json", | ||
"test": "jest" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
] | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
] | ||
} |
Oops, something went wrong.