当前位置:   article > 正文

mootools_MooTools Forge / GitHub插件结构Shell脚本

mootools_MooTools Forge / GitHub插件结构Shell脚本

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创建后,我将运行脚本,并为其指定插件和存储库的名称(它们必须相同):

  1. ./newPlugin.sh ScrollSpy

The script itself looks like:

脚本本身看起来像:

  1. #!/bin/sh
  2. mkdir $1
  3. cd $1
  4. git init
  5. touch README.md
  6. mkdir Source
  7. touch Source/$1.js
  8. touch Source/$1-yui-compressed.js
  9. mkdir Docs
  10. touch Docs/$1.md
  11. touch package.yml
  12. echo "name: $1
  13. author: davidwalsh
  14. current:
  15. category:
  16. tags: []
  17. docs:
  18. demo: " >> package.yml;
  19. cd $1
  20. git add *
  21. git commit -m "First Commit"
  22. 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!

翻译自: https://davidwalsh.name/mootools-forge-script

mootools

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/秋刀鱼在做梦/article/detail/772304
推荐阅读
相关标签
  

闽ICP备14008679号