{"id":16485168,"url":"https://github.com/single9/s9-build-tool","last_synced_at":"2025-10-27T18:30:58.758Z","repository":{"id":33395749,"uuid":"130363863","full_name":"single9/s9-build-tool","owner":"single9","description":"A build tool for Node.js app development.","archived":true,"fork":false,"pushed_at":"2022-01-18T03:43:22.000Z","size":201,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T14:45:08.107Z","etag":null,"topics":["build-tool","node-js","nodejs"],"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/single9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-20T13:11:19.000Z","updated_at":"2023-08-07T17:59:47.000Z","dependencies_parsed_at":"2022-08-07T21:15:14.741Z","dependency_job_id":null,"html_url":"https://github.com/single9/s9-build-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fs9-build-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fs9-build-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fs9-build-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fs9-build-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/single9","download_url":"https://codeload.github.com/single9/s9-build-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238536156,"owners_count":19488667,"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":["build-tool","node-js","nodejs"],"created_at":"2024-10-11T13:24:24.930Z","updated_at":"2025-10-27T18:30:58.414Z","avatar_url":"https://github.com/single9.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"S9 Build Tool\n=============\n\nA build tool for node.js app development.\n\nThis tool will watch any file you changed in project and refresh your browser when the source is built.\n\nSaving your time and get more life.\n\n### Dependiences\n\n- Webpack 4\n- Browser Sync\n- Nunjucks Template Engine \n\n### Webpack Loader\n\n- Babel\n- Vue\n- Less\n\n### Webpack Plugin\n\n- Hot Module Replacement\n\nInstallation\n-------------\n\n```bash\ngit clone https://github.com/single9/s9-build-tool.git\ncd s9-build-tool\nnpm link\n```\n\nUsage\n------------\n\n### Initial project\n\n1. Create A new folder for project.\n\n```\nmkdir \u003cproject_name\u003e\n```\n    \n2. Initialize the project.\n\n```\ns9tool init [-n \u003cproject_name\u003e]\n```\n\n3. Install dependencies\n\n```\nnpm install\n```\n\n4. Configuring your project\n\nEdit file: `configs.js`\n\n```js\nconst webpack = [\n    {\n        // Most of settings are same as Webpack.\n        // But entry is a bit different with normal webpack config.\n        // Your entry must be an Array to ensure Webpack's HMR Module\n        // work correctly.\n        entry: {\n            entry: [\n                path.join(__dirname, 'src/views/assets/entry.js')\n            ]\n        },\n        output: {\n            path: path.resolve(__dirname, 'build/assets/js'),\n            filename: '[name].bundle.js',\n            // If you have more than one webpack config, you must ensure this path is unique.\n            publicPath: '/public/js'\n        },\n        // You can add/override any settings you want.\n        optimization: {\n            splitChunks: {\n                cacheGroups: {\n                    default: false,\n                    vendor: {\n                        test: /node_modules/,\n                        name: 'vendor',\n                        chunks: 'initial',\n                    }\n                },\n            }\n        }\n    }\n];\n\n// This is Nunjucks config.\nconst template = {\n    src: './src/views/njk',     // Source location\n    output: './build/views',    // Output location\n    files: [\n        {\n            name: 'index',      // Output file name\n            file: 'index.njk',  // Source file name\n            render: {           // Render string\n                message: 'Yooo',\n                title: 'Hello!'\n            }\n        }\n    ]\n};\n\nmodule.exports = {\n    webpack,\n    template\n};\n```\n\n5. Start development server\n\n```bash\ns9tool dev\n```\n\nWhen development server is ready, your browser will auto-open immediately.\n\n\u003e The devlopment server is listening on port 3000. And you can change it.\n\n```bash\n# change port\nPORT=3333 s9tool dev\n```\n\n6. Coding for fun!\n\n### Build App\n\n    s9tool build\n\nYou will get a new folder named `build`. This folder contains all your project need.\n\nSnapshoot\n---------\n\n![](https://i.imgur.com/4f6pqGb.png)\n\nCommands\n---------\n\n    Usage: s9tool [options] [command]\n\n    Commands:\n\n    init [options]  Initialize the project\n    dev             Development mode\n    build           Build project\n\nTo-Do\n---------\n\n- SSR option\n- Template engine hook","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingle9%2Fs9-build-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingle9%2Fs9-build-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingle9%2Fs9-build-tool/lists"}