{"id":21700065,"url":"https://github.com/opuscapita/npm-scripts","last_synced_at":"2025-04-12T13:34:00.434Z","repository":{"id":57096161,"uuid":"74664231","full_name":"OpusCapita/npm-scripts","owner":"OpusCapita","description":"NPM scripts: used for publishing packages, etc.","archived":false,"fork":false,"pushed_at":"2023-07-06T18:17:46.000Z","size":107,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-04-04T09:36:13.988Z","etag":null,"topics":["changelog-generator","javascript","npm","npm-scripts","release-automation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpusCapita.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-11-24T10:49:30.000Z","updated_at":"2022-09-20T07:39:45.000Z","dependencies_parsed_at":"2024-06-21T07:38:27.375Z","dependency_job_id":null,"html_url":"https://github.com/OpusCapita/npm-scripts","commit_stats":{"total_commits":148,"total_committers":16,"mean_commits":9.25,"dds":0.7837837837837838,"last_synced_commit":"d70c80f48ebbd862c84617de834d239cecd17023"},"previous_names":["opuscapitabes/js-npm-scripts"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpusCapita%2Fnpm-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpusCapita%2Fnpm-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpusCapita%2Fnpm-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpusCapita%2Fnpm-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpusCapita","download_url":"https://codeload.github.com/OpusCapita/npm-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248573525,"owners_count":21126852,"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":["changelog-generator","javascript","npm","npm-scripts","release-automation"],"created_at":"2024-11-25T20:12:38.868Z","updated_at":"2025-04-12T13:34:00.403Z","avatar_url":"https://github.com/OpusCapita.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![badge-npm-version](https://img.shields.io/npm/v/@opuscapita/npm-scripts.svg)](https://npmjs.org/package/@opuscapita/npm-scripts)\n[![NPM Downloads](https://img.shields.io/npm/dm/@opuscapita/npm-scripts.svg)](https://npmjs.org/package/@opuscapita/npm-scripts)\n![badge-license](https://img.shields.io/github/license/OpusCapita/npm-scripts.svg)\n\n# OpusCapita npm scripts\n\n## Synopsis\n\nPackage provides an unified release/build approach for **npm package** and **grails plugin** from npm packages.\n\n## Usage\n\n### Goals\n\n#### npm-publish\nUpdates CHANDELOG.md and publishes npm module (all changes are committed and pushed to GIT repository)\n\n##### options\n- `npm-publish --test` - generates npm package and saves as local file (tarball will be created instead of publishing to NPM)\n- `npm-publish --release` - creates release, publishes the package to local repo with calling `update-changelog` goal\n\n#### update-changelog\nUpdates CHANGELOG.md that contains changes between the releases\n\n##### options\n- `update-changelog --all` - completely regenerate full CHANGELOG.md with all changes between all the releases\n\n#### grails-plugin-install\nInstalls grails plugin to local repository\n\n##### options\n- `grails-plugin-install --release` - installs plugin as release\n\n#### grails-plugin-deploy\nDeploys grails plugin to remote repository\n\n##### options\n- `grails-plugin-deploy --release` - deploys plugin as release\n\n#### grails-plugin-package\nPackages grails plugin\n\n##### options\n- `grails-plugin-package --release` - package plugin as release\n\n### NPM publish example\n\n**package.json**\n\n```json\n...\n\"scripts\": {\n  \"npm-build\": \"rimraf ./lib \u0026\u0026 webpack --config ./webpack.production.config\",\n  \"npm-publish\": \"npm run npm-build \u0026\u0026 npm-publish\",\n  \"publish-release\": \"npm run npm-publish -- --release\",\n  \"publish-snapshot\": \"npm run npm-publish\"\n}\n...\n```\n\n### Grails plugin configuration\nIf you want **publish module as grails resources**, you can add **grails** section in your **package.json**\n\n**package.json (simple resource files definition)**\n```json\n...\n\"grails\": {\n  \"artefactId\": \"simple-js-resources\",\n  \"groupId\":\"com.opuscapita.grailsplugins\",\n  \"resources\": {\n    \"simple-resource-module\": {\n      \"dependsOn\": [\"jquery\"],\n      \"defaultBundle\": false,\n      \"files\": {\n        \"bundles/first.js\": \"js/bundles/first.js\",\n        \"bundles/second.js\": \"js/bundles/second.js\"\n      }    \n    }\n  },\n  \"standaloneFiles\": {\n    \"bundles/first.js\": \"src/java/first.js\",\n    \"bundles/second.js\": \"src/java/second.js\",\n    \"resources/fonts\": \"web-app/fonts\"\n  }\n}\n...\n```\n\n**package.json (extended resource files definition)**\n```json\n...\n\"grails\": {\n  \"artefactId\": \"extended-js-resources\",\n  \"groupId\": \"com.opuscapita.grailsplugins\",\n  \"resources\": {\n    \"complex-resource-module\": {\n      \"files\": [{\n        \"source\": \"bundles/main.css\",\n        \"target\": \"css/main.css\",\n        \"attrs\": {\n          \"type\": \"css\",\n          \"media\": \"screen, projection, print\"\n         },\n        \"exclude\": \"bundle, minify\"\n      }, {\n        \"source\": \"bundles/second.js\",\n        \"target\": \"js/bundles/second.js\",\n        \"attrs\": {\n          \"type\": \"js\"\n        }\n      }]\n    }\n  }\n}\n...\n```\n\n* `artefactId` - override artefact ID for grails plugins, by default will be taken from project.name\n* `groupId` - override group ID for grails plugins, by default will be com.opuscapita.grailsplugins\n* `resources` - defines resource bundles (used Grails Resource plugin) that should be generated\n    * `external-resources` - String, resource unique name/ID\n        * `dependsOn` - Array of grails resource module IDs (not required)\n        * `defaultBundle` - String or Boolean, defines grails resource module defaultBundle value (not required)\n        * `files` - copy files relative web-app dir (should be Object or Array, see examples above)\n* `standaloneFiles` - copy files relative root dir\n\n**To be able to deploy grails plugins you must to have Maven v3.x to be installed\nand mvn (or mvn.cmd under Windows) available in PATH.**\n\n## Contributors\n\n* Dmitry Divin dmitriy.divin@jcatalog.com\n* Alexey Sergeev alexey.sergeev@jcatalog.com\n\n## License\n\n**OpusCapita npm-scripts** is licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopuscapita%2Fnpm-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopuscapita%2Fnpm-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopuscapita%2Fnpm-scripts/lists"}