{"id":23338758,"url":"https://github.com/appfeel/ionic-plugin-build","last_synced_at":"2026-05-07T18:10:53.240Z","repository":{"id":79802275,"uuid":"71883589","full_name":"appfeel/ionic-plugin-build","owner":"appfeel","description":"Ionic builder plugin","archived":false,"fork":false,"pushed_at":"2017-11-27T11:16:09.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-10T09:39:33.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appfeel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-25T09:56:56.000Z","updated_at":"2016-10-25T10:50:06.000Z","dependencies_parsed_at":"2024-01-29T11:33:54.956Z","dependency_job_id":null,"html_url":"https://github.com/appfeel/ionic-plugin-build","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/appfeel/ionic-plugin-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fionic-plugin-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fionic-plugin-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fionic-plugin-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fionic-plugin-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appfeel","download_url":"https://codeload.github.com/appfeel/ionic-plugin-build/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fionic-plugin-build/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259671218,"owners_count":22893660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-21T03:16:20.364Z","updated_at":"2026-05-07T18:10:48.221Z","avatar_url":"https://github.com/appfeel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ionic Build plugin\n\n**NOTE:** It requires that all development to be done under `src/` folder, instead of `www/` folder.\n\nThis is an Ionic plugin to build source files. It performs the following operations:\n\n- Preprocess `index.html` (see [preprocess](https://www.npmjs.com/package/preprocess))\n- Read all `*.html` templates, lint and converts them to minified javascript files, using `$templateCache.put(...)`\n- Transforms all `templateUrl: 'path/to/template.html'` into `templateProvider:function($templateCache){return $templateCache.get('path/to/template.html')}`\n- Read all `.css` files from `index.html`, minifies and concats them into `all.min.css` (minification is only done when -p flag is set or when -sc flag is set without -p flag)\n- In every `.css`, replaces `../fonts/ionicons*` with `${bowerrc path}/ionic/fonts/ionicons*`\n- In every `.css`, replaces `../fonts/fontawesomeionicons*` with `${bowerrc path}/components-font-awesome/fonts/fontawesome*`\n- In every `.css`, replaces `../img/*` with `img/*`\n- Read all `.js` files from `index.html`, lints, annotates, minifies and concats them into `all.min.js` (minification is only done when -p flag is set or when -sc flag is set without -p flag)\n- Skips minification in resources under bower modules and already minified ones\n- Copies all resources from `src/` to `www/` (images, etc)\n- Replaces all scripts in `index.html` between `\u003c!--startsrc--\u003e` and `\u003c!--endsrc--\u003e` with `\u003cscript src=\"all.min.js?v=${new Date().getTime()}\"\u003e\u003c/script\u003e`\n- Replaces all links in `index.html` between `\u003c!--startcss--\u003e` and `\u003c!--endcss--\u003e` with `\u003clink href=\"all.min.css?v=${new Date().getTime()}\" rel=\"stylesheet\"\u003e`\n\nThese tasks are executed every time a `cordova prepare`, `phonegap prepare` or `ionic prepare` is executed.\n\nWhen the command is `phonegap serve` it copies all files from `src/` to `www/` without modifying them and watch for changes in `src/` directory, so they are immediately populated to corresponding platform.\n\n## Options:\n\n```js\n    options.help = options.h || options.help; // Help\n    options.production = options.p || options.prod || options.production; // Production\n    options.debug = options.d || options.debug; // DEBUG\n    options.angularDebug = options.ad || options['angular-debug']; // ANGULAR_DEBUG\n    options.skipLint = options.sl || options['skip-lint']; // Skip lint\n    options.noFailLint = options.nf || options['no-fail-lint']; // Don't fail on javascript/html errors\n    options.skipComp = options.sc || options['skip-comp']; // Skip compression\n    options.verbose = options.vb || options.verb || options.verbose; // Verbose\n    options.extendedReport = options.xr || options['extended-report']; // Extended hint reports\n    options.skipAll = options.sa || options['skip-all']; // Extended hint reports\n    options.preprocessResources = options.ppr || options['preprocess-resources']; // Preprocess resources\n\n    options.skipComp = options.production ? options.skipComp : !options.skipComp;\n    options.env = options.production ? 'production' : 'development';\n    options.concatResources = options.production;\n    options.skipHtmlCompression = options.skipHtmlCompression || options.skipComp;\n    options.skipResCompression = options.skipResCompression || options.skipComp;\n    options.dest = options.dest || 'build';\n    global.NODE_ENV = options.env;\n\n    return {\n        context: {\n            NODE_ENV: options.env,\n            DEBUG: (options.debug \u0026\u0026 options.production)\n                || (!options.debug \u0026\u0026 !options.production) ? true : undefined,\n            ANGULAR_DEBUG: (options.angularDebug \u0026\u0026 options.production)\n                || (!options.angularDebug \u0026\u0026 !options.production) ? true : undefined,\n        },\n    };\n```\n\nContext variables are used to [preprocess](https://www.npmjs.com/package/preprocess) `index.html`.\n\nThis options can be used it like this:\n\n```bash\n$ cordova prepare browser -p --skip-lint -nf\n```\n\n## Ionic:\n\nWhen `cordova serve ...` is executed, this plugin automatically detects it and watch for file changes. The problem with `ionic run browser -l` is that it executes `cordova run browser` untherneath, so no serve can be detected. In this case you can use the `-w` or `-watch` flags:\n\n```\n$ ionic run browser -l -w -nf\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappfeel%2Fionic-plugin-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappfeel%2Fionic-plugin-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappfeel%2Fionic-plugin-build/lists"}