在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):calebds/healthy-gulp-angular开源软件地址(OpenSource Url):https://github.com/calebds/healthy-gulp-angular开源编程语言(OpenSource Language):CSS 79.1%开源软件介绍(OpenSource Introduction):This project is a starting point for AngularJS projects using the Gulp streaming build system. Almost everything important is in gulpfile.js. For a full discussion of the setup, please refer to the companion blog post. InstallationBefore running any Gulp tasks:
Project StructureThe project ships with a directory structure like:
Let's break this down.. package.jsonServer-side (command-line) dependencies. bower.jsonClient-side (browser) dependencies. gulpfile.jsWhere all the Gulp streams and tasks are specified. Tasks are outlined below. This file is discussed in detail in the blog post. /appAll first-party application source code lives here, including HTML, scripts, and styles of whatever flavor. /app/index.htmlThe single page app "shell page". Adapted from Angular Seed. All sources are automatically wired in with gulp-inject. /app/app.jsThe app's main angular module is defined here. This file is always loaded first with gulp-angular-filesort. /app/componentsI like to group my angular scripts by comonent. Each sub-directory here typically contains a directive and a matching html partial. /app/stylesCustom app styles (I use SASS) live here. There's also a foundation settings file. server.jsThis is the entrypoint for the ExpressJS development server. It respects the environment variable /devServerThe scripts for the development server. I'll typically put mock API responses in here. Processed SourcesThe gulp tasks listed below deal with taking sources from /app and "compiling" them for either development or production. /dist.devSources built for development. Styles are compiled to CSS. Everything else from /app is validated and moved directly in here. Nothing is concatenated, uglified, or minified. Vendor scripts are moved in as well.
/dist.prodSources built for production. Everything is validated, things are concatenated and uglified. HTML partials are pre-loaded into the angular template cache with gulp-ng-html2js.
Pretty self-explanatory. Gulp TasksAll of the following are available from the command line. Essential onesThese tasks I use as part of my regular developments and deploy scripts:
Sub-tasksAll the subtasks can alo be run from the command line: HTML
Scripts
Styles
Index
Everything
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论