Skip to content

Commit a6cd2a5

Browse files
committed
first-commit
0 parents  commit a6cd2a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+6974
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
*.pem
8+
app/
9+
*.crx
10+
*.zip

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Chrome Plugin Css3 Animation
2+
3+
快速给页面加上炫酷css3动画的chrome插件。
4+
5+
## 使用
6+
### 1.从chrome webstore下载
7+
[chrome应用商店安装地址https://chrome.google.com/webstore/detail/lhbbbidpkalopmenjffckblgbdhcffpa](https://chrome.google.com/webstore/detail/lhbbbidpkalopmenjffckblgbdhcffpa)
8+
9+
### 2.直接下载crx文件
10+
[下载地址]()
11+
12+
### 3.自行构建
13+
- `npm install -g vue-cli`
14+
- `git clone https://github.com/vace/css3-animation-generator`
15+
- `cd css3-animation-generator && npm install`
16+
- `npm run app`
17+
18+
19+
## 样式导出规则:
20+
1. 优先使用带有 `c3`前缀的class,如 `<span class="c3-test">animate it</span>`
21+
2. 如果存在class,则使用class选择器,如 `<span class="fl animate">animate it</span>`
22+
3. 如果定义了Id,则使用id选择器,如 `<span id="anim1">animate it</span>`
23+
4. 如果都不存在,则使用内部自定义的选择器查找方案
24+
25+
26+
## Remark
27+
28+
- [animate.css](https://github.com]daneden/animate.css)
29+
- [magic.css](https://github.com/miniMAC/magic)
30+
- [iview](https://github.com/iview/iview)
31+
- [vue](https://github.com/vuejs/vue)
32+
- [chrome developer](https://developer.chrome.com/extensions)

gen/animate-css-gen.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
const fs = require('fs')
2+
3+
const utils = require('./utils')
4+
const library = require('./library')('Animate',{
5+
desc:'A cross-browser library of CSS animations. As easy to use as an easy thing.',
6+
version:'3.5.2',
7+
creator:'Daniel Eden',
8+
license:'MIT',
9+
git:'https://github.com/daneden/animate.css',
10+
demo:'https://daneden.github.io/animate.css/'
11+
})
12+
13+
const css = fs.readFileSync(__dirname + '/css/animate.css','utf-8')
14+
15+
const GroupKey = [
16+
'bounce','bounceIn','fadeIn','flip','lightSpeed','rotateIn','hinge','zoomIn','slideInDown'
17+
]
18+
const GroupString = [
19+
'Attention','Bouncing','Fading','Flippers','Lightspeed','Rotating','Specials','Zoom','Sliding'
20+
]
21+
22+
let GroupIndex = 0
23+
24+
let Results = utils.genKeyframes(css)
25+
26+
Results.map(({name,keyframe}) => {
27+
var idx = GroupKey.indexOf(name)
28+
if(idx !== -1){
29+
GroupIndex = idx
30+
}
31+
library.add({
32+
group:GroupString[GroupIndex],
33+
name,
34+
keyframe,
35+
tags:utils.hyphenate(name).split('-')
36+
})
37+
})
38+
39+
library.export()

gen/css-gen.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require('./animate-css-gen')
2+
require('./magic-css-gen')
3+
require('./other-css-gen')

0 commit comments

Comments
 (0)