gdmedia/silverstripe-module-boilerplate 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gdmedia/silverstripe-module-boilerplate

Composer 安装命令:

composer require gdmedia/silverstripe-module-boilerplate

包简介

Simple boilerplate to help kick start a new Silverstripe module.

README 文档

README

Simple boilerplate to help kick start a new Silverstripe module.

Creating a new module

Quickly setup a new module skeleton by cloning this repository and deleting the .git folder.

To do this in one line, from the command line run:
(Replace MyModuleFolder with name of the folder where you want to create your new module.)

###Windows Using Composer

cmd /V /C "set "SS_MODULE_DIR=MyModuleFolder" && composer require gdmedia/silverstripe-module-boilerplate && move silverstripe-module-boilerplate !SS_MODULE_DIR! && composer remove gdmedia/silverstripe-module-boilerplate && IF EXIST !SS_MODULE_DIR!\.git rmdir /q /s !SS_MODULE_DIR!\.git"

Using GIT

cmd /V /C "set "SS_MODULE_DIR=MyModuleFolder" && git clone https://github.com/guru-digital/silverstripe-module-boilerplate.git !SS_MODULE_DIR! && rmdir /q /s !SS_MODULE_DIR!\.git"

###*nix Using Composer

SS_MODULE_DIR=MyModuleFolder && composer require --prefer-dist gdmedia/silverstripe-module-boilerplate && mv silverstripe-module-boilerplate $SS_MODULE_DIR && composer remove gdmedia/silverstripe-module-boilerplate && [ -d ${SS_MODULE_DIR}/.git ] && rm -r ${SS_MODULE_DIR}/.git

Using GIT

SS_MODULE_DIR=MyModuleFolder && git clone https://github.com/guru-digital/silverstripe-module-boilerplate.git $SS_MODULE_DIR && rm -rf ${SS_MODULE_DIR}/.git

Grunt

You can use Grunt to quickly rename the boiler plate file names and place holders.

###grunt rename-project To use, after installing with the steps above:

  • Edit package.json and update the values to suit your new module.
  • Edit Gruntfile.js - lines 5 to 9 and update the values to suit your new module.
  • From the command line run: (Replace MyModuleFolder with name of the folder where you want to create your new module.)
cd MyModuleFolder
npm install
grunt rename-project

This will:

###grunt update_json Running grunt update_json will update composer.json and bower.json from the corresponding values in package.json

###grunt jshint Running grunt jshint will run js hint over all non-minified javascript files in assets/javascript

###grunt uglify Running grunt uglify will run minify javascript files in assets/javascript

###grunt cssmin Running grunt cssmin will run minify CSS files in assets/css

###grunt default Running grunt default will run the update_json, jshint, uglify and cssmin tasks one after another.

Pull requests welcome!

If you have a class, file or anything else that may be handy to have in this boilerplate, submit an issue or pull request

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 6
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2015-09-17