{"id":17551423,"url":"https://github.com/taufik-nurrohman/factory","last_synced_at":"2025-04-24T02:09:19.834Z","repository":{"id":57164654,"uuid":"352662469","full_name":"taufik-nurrohman/factory","owner":"taufik-nurrohman","description":"Simple Node.js script to generate CSS, HTML, and JavaScript files from ECMAScript, Pug, and SCSS files.","archived":false,"fork":false,"pushed_at":"2024-10-25T02:58:10.000Z","size":109,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T02:09:09.171Z","etag":null,"topics":["css","generator","html","js","mjs","node","pug","scss","static"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taufik-nurrohman.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-03-29T13:57:05.000Z","updated_at":"2024-10-25T02:57:53.000Z","dependencies_parsed_at":"2024-01-29T06:01:21.087Z","dependency_job_id":"0f1b47d6-b4e8-48bb-bf6a-dee48d7e1cd3","html_url":"https://github.com/taufik-nurrohman/factory","commit_stats":{"total_commits":74,"total_committers":2,"mean_commits":37.0,"dds":0.06756756756756754,"last_synced_commit":"2eeda4a8138a27c8b5ff9461b733643295a616c4"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taufik-nurrohman%2Ffactory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taufik-nurrohman%2Ffactory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taufik-nurrohman%2Ffactory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taufik-nurrohman%2Ffactory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taufik-nurrohman","download_url":"https://codeload.github.com/taufik-nurrohman/factory/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250546082,"owners_count":21448260,"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":["css","generator","html","js","mjs","node","pug","scss","static"],"created_at":"2024-10-21T04:45:53.404Z","updated_at":"2025-04-24T02:09:19.806Z","avatar_url":"https://github.com/taufik-nurrohman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Factory\n=======\n\nSimple Node.js script to generate CSS, HTML, and JavaScript files from ECMAScript, Pug, and SCSS files.\n\n_Paket, paket Node.js apa yang digemari para suami? Namanya [@taufik-nurrohman/factory](https://www.npmjs.com/package/@taufik-nurrohman/factory). Karena cara pakainya `npm run pack`. Xixixi lucu yah pack_ 😁\n\nUsage\n-----\n\n~~~ sh\nmkdir my-project\nmkdir my-project/src\nmkdir my-project/dist\n~~~\n\nPaste your `*.scss`, `*.mjs`, and `*.pug` files to `.\\my-project\\src` folder.\n\n~~~ sh\ncd my-project\nnpm install @taufik-nurrohman/factory --save-dev\n~~~\n\nCreate a `scripts` field that runs the `pack` command in `.\\my-project\\package.json`\n\n~~~ json\n{\n  \"scripts\": {\n    \"pack\": \"pack --from=src --to=dist\"\n  }\n}\n~~~\n\nGenerate the production ready files this way:\n\n~~~ sh\nnpm run pack\n~~~\n\nFile extension from the source folder will be removed. Make sure to name your files with two file extension like so:\n\n - `index.css.scss`\n - `index.html.pug`\n - `index.js.mjs`\n - `index.php.pug`\n - `LICENSE.txt`\n - `LICENSE.txt.txt`\n\nSo that in the distributable folder, your files will be renamed to:\n\n - `index.css`\n - `index.html`\n - `index.js`\n - `index.php`\n - `LICENSE`\n - `LICENSE.txt`\n\n\u003e [!TIP]\n\u003e\n\u003e Use “fetch” syntax in `*.mjs` and `*.scss` files with a valid file path to load it inline:\n\u003e\n\u003e ~~~ scss\n\u003e /// FETCH('../node_modules/bootstrap/dist/css/bootstrap.css');\n\u003e ~~~\n\u003e\n\u003e ~~~ mjs\n\u003e /// FETCH('../node_modules/bootstrap/dist/js/bootstrap.js');\n\u003e ~~~\n\u003e\n\u003e External URL will be downloaded, and its content will replace the “fetch” block:\n\u003e\n\u003e ~~~ scss\n\u003e /// FETCH('https://example.com/assets/index.css');\n\u003e ~~~\n\u003e\n\u003e ~~~ mjs\n\u003e /// FETCH('https://example.com/assets/index.js');\n\u003e ~~~\n\nOptions\n-------\n\nKey | Description\n--- | -----------\n`--clean` | Clean-up the old compiled files before re-compile (default to `true`).\n`--from` | Folder path to store the files to be compiled (default to `\"src\"`).\n`--js-bottom` | Insert string at the bottom of the file (default to `\"\"`).\n`--js-exports` | What [export mode](https://rollupjs.org/guide/en/#outputexports) to use? (default to `\"auto\"`).\n`--js-external` | JavaScript [external module names](https://rollupjs.org/guide/en/#quick-start) (default to `\"\"`).\n`--js-format` | JavaScript [module format](https://rollupjs.org/guide/en/#quick-start) (default to `\"iife\"`).\n`--js-globals` | JavaScript global variables (default to `\"\"`). Example: `--js-globals=\"jquery:jQuery,react:React,vue:Vue\"`.\n`--js-name` | JavaScript [module name](https://rollupjs.org/guide/en/#quick-start) (default to `\"\"`).\n`--js-top` | Insert string at the top of the file (default to `\"\"`).\n`--mjs` | Include MJS files to the output.\n`--pug` | Include PUG files to the output.\n`--scss` | Include SCSS files to the output.\n`--silent` | Disable logging (default to `false`).\n`--to` | Folder path to store the compiled files (default to `\"dist\"`).\n`--version` | Show version information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaufik-nurrohman%2Ffactory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaufik-nurrohman%2Ffactory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaufik-nurrohman%2Ffactory/lists"}