fleet/website/tasks/pipeline.js
Mike McNeil 27eae209fd
Move fleetdm.com into main Fleet repo (#83)
* rename dir

* no need to install website or docs from npm

At some point, would also be nice to be able to exclude assets/ as well, and to only install a pre-built version of Fleet's frontend code

* Bring in fleetdm.com website

From https://github.com/fleetdm/fleetdm.com as of https://github.com/fleetdm/fleetdm.com/releases/tag/v0.0.21

* add procfile for heroku

Using https://github.com/timanovsky/subdir-heroku-buildpack

* avoid getting anybody's hopes up

* Create deploy-fleet-website.yml (#82)

* Create deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* update pjs with SPDX-like license expressions.  also fix repo URL

and remove package lock

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* remove dummy uri

* Dissect deploy script

* Update deploy-fleet-website.yml

* workaround for eslintrc nesting issue

* lint fixes

* forgot the .js

* add per-commit git config

* Update deploy-fleet-website.yml

* might as well remove that

* cleanup

* connect w/ heroku app and have it actually push

* fix bug I introduced in 578a1a01ffb8404aae869e05005e30a6ba2b2a95

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* the beauty, the glory, of javascript

* GH actions don't like "\n"

* Update deploy-fleet-website.yml

* restore \n chars from 0d45e568f693efba7d7072085bc98d72a482d9ae

hoping I was wrong in 0d45e568f693efba7d7072085bc98d72a482d9ae but see also https://github.community/t/what-is-the-correct-character-escaping-for-workflow-command-values-e-g-echo-xxxx/118465/5

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* Update deploy-fleet-website.yml

* rename script to prevent duplicate building

* Configure the real website

* clean up

* a test of the deploy workflow

* add handbook to npmignore

* I guess you could call this fixing a typo

* point workflow at master branch

* now clearly bogus: this completely unused version string
2020-12-02 14:48:03 -06:00

159 lines
11 KiB
JavaScript
Vendored

/**
* tasks/pipeline.js
*
* The order in which your CSS, JavaScript, and client-side template files
* injected as <script> or <link> tags.
*
* > If you are not relying on automatic asset linking, then you can safely ignore this file.
*
* For more information see:
* https://sailsjs.com/anatomy/tasks/pipeline.js
*/
// ██████╗ ██╗ █████╗ ██╗███╗ ██╗ ██████╗███████╗███████╗
// ██╔══██╗██║ ██╔══██╗██║████╗ ██║ ██╔════╝██╔════╝██╔════╝
// ██████╔╝██║ ███████║██║██╔██╗ ██║ ██║ ███████╗███████╗
// ██╔═══╝ ██║ ██╔══██║██║██║╚██╗██║ ██║ ╚════██║╚════██║
// ██║ ███████╗██║ ██║██║██║ ╚████║ ██╗╚██████╗███████║███████║
// ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝╚══════╝╚══════╝
//
// ███████╗██╗██╗ ███████╗███████╗
// ██╔════╝██║██║ ██╔════╝██╔════╝
// █████╗ ██║██║ █████╗ ███████╗
// ██╔══╝ ██║██║ ██╔══╝ ╚════██║
// ██║ ██║███████╗███████╗███████║
// ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
//
// CSS files to inject as <link> tags, in order.
//
// > Note: if you're using built-in LESS support with default settings,
// > you'll want to change `assets/styles/importer.less` instead.
//
var cssFilesToInject = [
// Bring in `.css` files for themes and style guides (e.g. Bootstrap, Foundation)
'dependencies/**/*.css',
// All of the rest of your custom `.css` files will be injected here,
// in no particular order. To customize the ordering, add additional
// items here, _above_ this one.
'styles/**/*.css'
];
// ██████╗██╗ ██╗███████╗███╗ ██╗████████╗ ███████╗██╗██████╗ ███████╗
// ██╔════╝██║ ██║██╔════╝████╗ ██║╚══██╔══╝ ██╔════╝██║██╔══██╗██╔════╝
// ██║ ██║ ██║█████╗ ██╔██╗ ██║ ██║█████╗███████╗██║██║ ██║█████╗
// ██║ ██║ ██║██╔══╝ ██║╚██╗██║ ██║╚════╝╚════██║██║██║ ██║██╔══╝
// ╚██████╗███████╗██║███████╗██║ ╚████║ ██║ ███████║██║██████╔╝███████╗
// ╚═════╝╚══════╝╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝╚═════╝ ╚══════╝
//
// ██╗███████╗ ███████╗██╗██╗ ███████╗███████╗
// ██║██╔════╝ ██╔════╝██║██║ ██╔════╝██╔════╝
// ██║███████╗ █████╗ ██║██║ █████╗ ███████╗
// ██ ██║╚════██║ ██╔══╝ ██║██║ ██╔══╝ ╚════██║
// ██╗╚█████╔╝███████║ ██║ ██║███████╗███████╗███████║
// ╚═╝ ╚════╝ ╚══════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
//
// Client-side javascript files to inject as <script> tags, in order.
//
var jsFilesToInject = [
// Load `sails.io` before everything else.
'dependencies/sails.io.js',
// Bring in `.js` files for any other client-side JavaScript dependencies.
// (e.g. Lodash, Vue.js, jQuery, Bootstrap, Ember, Angular, etc.)
// > Be sure to list dependencies that depend on each other in the right order!
'dependencies/lodash.js',
'dependencies/jquery.min.js',
'dependencies/vue.js',
'dependencies/vue-router.js',
'dependencies/**/*.js',
// First amongst the app-level files, bring in cloud configuration
'js/cloud.setup.js',
// Bring in components & utilities before bringing in the rest (i.e. page scripts)
'js/components/**/*.js',
'js/utilities/**/*.js',
// All of the rest of your custom client-side js files will be injected here,
// in no particular order. To customize the ordering, add additional items
// here, _above_ this one.
'js/**/*.js'
];
// ██████╗██╗ ██╗███████╗███╗ ██╗████████╗ ███████╗██╗██████╗ ███████╗
// ██╔════╝██║ ██║██╔════╝████╗ ██║╚══██╔══╝ ██╔════╝██║██╔══██╗██╔════╝
// ██║ ██║ ██║█████╗ ██╔██╗ ██║ ██║█████╗███████╗██║██║ ██║█████╗
// ██║ ██║ ██║██╔══╝ ██║╚██╗██║ ██║╚════╝╚════██║██║██║ ██║██╔══╝
// ╚██████╗███████╗██║███████╗██║ ╚████║ ██║ ███████║██║██████╔╝███████╗
// ╚═════╝╚══════╝╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝╚═════╝ ╚══════╝
//
// ████████╗███████╗███╗ ███╗██████╗ ██╗ █████╗ ████████╗███████╗███████╗
// ╚══██╔══╝██╔════╝████╗ ████║██╔══██╗██║ ██╔══██╗╚══██╔══╝██╔════╝██╔════╝
// ██║ █████╗ ██╔████╔██║██████╔╝██║ ███████║ ██║ █████╗ ███████╗
// ██║ ██╔══╝ ██║╚██╔╝██║██╔═══╝ ██║ ██╔══██║ ██║ ██╔══╝ ╚════██║
// ██║ ███████╗██║ ╚═╝ ██║██║ ███████╗██║ ██║ ██║ ███████╗███████║
// ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝
//
// Client-side HTML templates to precompile and inject as a single <script> tag.
// (The ordering of this array shouldn't matter.)
//
// > By default, Sails uses JST (~=lodash/underscore) templates and precompiles
// > them into functions for you. If you want to use handlebars, pug, dust, etc.,
// > with the asset linker, no problem-- you'll just want to make sure the precompiled
// > templates get spit out to the same file. For information on customizing and
// > installing your own Grunt tasks or using a different build pipeline, be sure
// > to check out:
// > https://sailsjs.com/docs/concepts/assets/task-automation
//
var templateFilesToInject = [
'templates/**/*.html'
];
// ███╗ ███╗██╗███████╗ ██████╗ ███████╗███████╗████████╗██╗ ██╗██████╗
// ████╗ ████║██║██╔════╝██╔════╝ ██╔════╝██╔════╝╚══██╔══╝██║ ██║██╔══██╗
// ██╔████╔██║██║███████╗██║ ███████╗█████╗ ██║ ██║ ██║██████╔╝
// ██║╚██╔╝██║██║╚════██║██║ ╚════██║██╔══╝ ██║ ██║ ██║██╔═══╝
// ██║ ╚═╝ ██║██║███████║╚██████╗██╗ ███████║███████╗ ██║ ╚██████╔╝██║
// ╚═╝ ╚═╝╚═╝╚══════╝ ╚═════╝╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚═════╝ ╚═╝
//
// The following code exists to parse the arrays of glob expressions above, and
// then expose them via `module.exports`. **You should not need to change any of
// the code below, unless you are modifying the default asset pipeline.**
// Default path for public folder (see documentation on sailsjs.com for more information)
var tmpPath = '.tmp/public/';
// Prefix relative paths to source files so they point to the proper locations
// (i.e. where the other Grunt tasks spit them out, or in some cases, where
// they reside in the first place)
module.exports.cssFilesToInject = cssFilesToInject.map((cssPath)=>{
// If we're ignoring the file, make sure the ! is at the beginning of the path
if (cssPath[0] === '!') {
return require('path').join('!' + tmpPath, cssPath.substr(1));
}
return require('path').join(tmpPath, cssPath);
});
module.exports.jsFilesToInject = jsFilesToInject.map((jsPath)=>{
// If we're ignoring the file, make sure the ! is at the beginning of the path
if (jsPath[0] === '!') {
return require('path').join('!' + tmpPath, jsPath.substr(1));
}
return require('path').join(tmpPath, jsPath);
});
module.exports.templateFilesToInject = templateFilesToInject.map((tplPath)=>{
// If we're ignoring the file, make sure the ! is at the beginning of the path
if (tplPath[0] === '!') {
return require('path').join('!assets/', tplPath.substr(1));
}
return require('path').join('assets/', tplPath);
});