在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):SC5/gulp-bobrsass-boilerplate开源软件地址(OpenSource Url):https://github.com/SC5/gulp-bobrsass-boilerplate开源编程语言(OpenSource Language):JavaScript 73.9%开源软件介绍(OpenSource Introduction):Gulp BoBrSASS BoilerplateBoBrSASS is a modifiable boilerplate combining some of our common tools and practices:
InstallationPrerequisitesThe latest version of BoBrSASS should work with recent versions of Ruby, Sass, Compass and Git. Please check the correct versions, maintained in our Travis configuration. If you insist on using an older version of dependencies, earlier versions of the boilerplate may work. For system level deps, install Node.js 0.10 or later and Ruby 2.1 or later and Git. When using Git on Windows, remember to enable usage from command prompt. Clone the project and trigger installation of the project dependencies by
If
BuildingBoBrSASS uses Gulp internally, but you can use npm scripts to trigger them. Build, test etc. tasks utilise npm development dependencies, so one should set 'NODE_ENV' to something else than 'production' or install the npm dependencies with a '--debug' flag. All the development dependencies are moved into devDependencies to avoid slow installs of the actual released software. Debug and Release builds
After this you should have a working, tested build in 'dist' directory. Watching for changesTo trigger debug build or other features, run the build with a combination of the following flags:
The above extra flags '-- [--]' syntax syntax only works for npm 2.0 or later. If you have an earlier version of dislike the syntax, trigger the same gulp tasks with your local Gulp installation:
To update your package version, you eventually want to do one of the following:
RunningRunning the Stub ServerThe boilerplate includes a minimal stub Express server in 'server/' directory. Its primary purpose is testing the frontend as part of the build, but nothing blocks you from expanding it into a full-blown server.
The server should respond your http requests on local port 8080. Deploying to AWS S3The resulting web application (contents of dist) can be deployed to an Amazon S3 bucket. You'll need to have
To create the bucket, run:
To deploy to S3, run:
Running with DockerBoilerplate also comes with Docker support. To have a minimal Docker image and speed up the containerization, the whole app is built before the packaging, and only the Node.js production dependencies get packaged. To build and run the container, run:
To access the service, check the dynamically allocated port (for example: 0.0.0.0:49164->8080/tcp) and use it in browser URL
Localhost works in Linux environment, but if you are using boot2docker, you need to use VM IP
instead. Check the IP and replace
Live Reloading the ChangesLive reloading is enabled when running gulp watch in another window. Just change any of your JavaScript or Sass files to trigger reload. The reload monitors 'dist' directory and pushes the changes as needed. Extending & HackingProject LayoutApp
Build System
Build Results
Using BoBrSASS as an UpstreamUpgrading the boilerplate in your project may be tedious work. Once BoBrSASS directory structure becomes stable (it might be already, but no guarantees!), you can use it directly as an upstream (here with a name 'bobrsass').
Now synchronizing with BoBrSASS becomes easier:
It is possible to use BoBrSASS as a subtree, too:
Note that you need to use a recent version of git that supports subtrees. The example pulls BoBrSASS master branch into 'client' subdirectory. The key here is to use '--prefix client' to keep the boilerplate in its own subdirectory. Later on, sync by:
TestingRun tests with PhantomJS:
Or in debug mode with chromedriver in a browser:
TODOPlase see project GitHub issue tracker. Release History
LicenseCopyright (c) 2014 SC5, licensed for users and contributors under MIT license. https://github.com/sc5/grunt-bobrsass-boilerplate/blob/master/LICENSE-MIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论