8000 Merge pull request #8 from ulyssear/dev · ulyssear/css-in-js-in-html@210a4b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 210a4b8

Browse files
authored
Merge pull request #8 from ulyssear/dev
Dev
2 parents 2c5ba7f + 75a45ed commit 210a4b8

File tree

5 files changed

+94
-4
lines changed

5 files changed

+94
-4
lines changed

.github/workflows/deploy-image.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
on:
2+
push:
3+
branches: [ master ]
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: get-npm-version
13+
id: package-version
14+
uses: martinbeentjes/npm-get-version-action@main
15+
16+
- name: create-new-branch
17+
uses: stefanzweifel/git-auto-commit-action@v4
18+
with:
19+
commit_message: "New release: ${{ steps.package-version.outputs.current-version }}"
20+
branch: ${{ steps.package-version.outputs.current-version }}
21+
repository: .
22+
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 16
26+
- run: npm install
27+
- run: npm run build
28+
29+
# - run: git config advice.addIgnoredFile false
30+
31+
- run: rm .gitignore
32+
- uses: stefanzweifel/git-auto-commit-action@v4
33+
with:
34+
commit_options: '--no-verify'
35+
commit_user_name: github-actions
36+
commit_user_email: noreply@arnaud.tech
37+
commit_author: github-actions <noreply@arnaud.tech>
38+
commit_message: "Remove .gitignore"
39+
skip_dirty_check: true
40+
push_options: '--force'
41+
create_branch: true
42+
branch: ${{ steps.package-version.outputs.current-version }}
43+
file_pattern: ./.gitignore
44+
45+
- uses: stefanzweifel/git-auto-commit-action@v4
46+
with:
47+
commit_message: Updated build files
48+
commit_options: '--no-verify'
49+
commit_user_name: github-actions
50+
commit_user_email: noreply@arnaud.tech
51+
commit_author: github-actions <noreply@arnaud.tech>
52+
file_pattern: |
53+
build/index.min.js
54+
# build/index.min.js.map
55+
package-lock.json
56+
skip_dirty_check: true
57+
push_options: '--force'
58+
branch: ${{ steps.package-version.outputs.current-version }}
59+
create_branch: true
60+
61+
publish-github-release:
62+
needs: build
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v3
66+
- name: get-npm-version
67+
id: package-version
68+
uses: martinbeentjes/npm-get-version-action@main
69+
- uses: actions/checkout@v3
70+
with:
71+
ref: ${{ steps.package-version.outputs.current-version }}
72+
- name: create-new-release
73+
uses: softprops/action-gh-release@v1
74+
with:
75+
files: |
76+
build/index.min.js
77+
# build/index.min.js.map
78+
package-lock.json
79+
tag_name: ${{ steps.package-version.outputs.current-version }}
80+
name: ${{ steps.package-version.outputs.current-version }}
81+
body: |
82+
Release ${{ steps.package-version.outputs.current-version }}
83+
draft: false
84+
prerelease: false
85+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ __Older browsers__
111111

112112
1. Import `main.js` in your HTML file
113113
```html
114-
<script src="https://cdn.jsdelivr.net/gh/ulyssear/css-in-js-in-html@master/main.js"></script>
114+
<script src="https://cdn.jsdelivr.net/gh/ulyssear/css-in-js-in-html@0.2.0/build/index.min.js"></script>
115115
```
116116

117117
2. Add one line of CSS to hide the page while building (and permits to hide elements with hidden attribute)

build/index.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.js renamed to index.js

File renamed without changes.

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
"name": "@ulyssear/css-in-js-in-html",
33
"version": "0.2.0",
44
"description": "CSS-in-JS-in-HTML is a library that allows you to use CSS-in-JS with HTML only.",
5-
"main": "main.js",
5+
"main": "build/index.js",
66
"scripts": {
7-
"tests": "echo \"Error: no test specified\" && exit 1"
7+
"tests": "echo \"Error: no test specified\" && exit 1",
8+
"build": "esbuild index.js --bundle --outfile=build/index.min.js --minify"
89
},
910
"repository": {
1011
"type": "git",
@@ -15,5 +16,8 @@
1516
"url": "https://github.com/ulyssear/css-in-js-i 5E09 n-html/issues"
1617
},
1718
"homepage": "https://github.com/ulyssear/css-in-js-in-html#readme",
18-
"license": "MIT"
19+
"license": "MIT",
20+
"dependencies": {
21+
"esbuild": "^0.17.19"
22+
}
1923
}

0 commit comments

Comments
 (0)
0