mootools
One thing I love about the MooTools Forge is that it requires a strict structure for its plugins i.e. requiring a README.md file, Source directory, etc. I've created a shell script that I can run that creates the directory structure and files required to add my plugin to GitHub and then the Forge.
我喜欢MooTools Forge的一件事是,它要求其插件具有严格的结构,即要求README.md文件,Source目录等。我创建了可以运行的Shell脚本,该脚本创建了所需的目录结构和文件将我的插件添加到GitHub,然后添加到Forge。
Shell脚本和用法 (The Shell Script & Usage )
The first step is creating the repository at GitHub. Once created at GitHub, I run the script, giving it the name of the plugin and repository (they must be the same):
第一步是在GitHub上创建存储库。 在GitHub创建后,我将运行脚本,并为其指定插件和存储库的名称(它们必须相同):
-
- ./newPlugin.sh ScrollSpy
The script itself looks like:
脚本本身看起来像:
-
- #!/bin/sh
- mkdir $1
- cd $1
- git init
- touch README.md
- mkdir Source
- touch Source/$1.js
- touch Source/$1-yui-compressed.js
- mkdir Docs
- touch Docs/$1.md
- touch package.yml
- echo "name: $1
- author: davidwalsh
- current:
- category:
- tags: []
- docs:
- demo: " >> package.yml;
- cd $1
- git add *
- git commit -m "First Commit"
- git remote add origin git@github.com:darkwing/$1.git
Tada! Done! Now I just need to populate each file with the necessary content. MooTools FTW!
多田 做完了! 现在,我只需要用必要的内容填充每个文件。 MooTools FTW!
mootools