{"id":15193969,"url":"https://github.com/shellyln/wp-quickstart-caller-example","last_synced_at":"2025-10-02T08:31:25.498Z","repository":{"id":57399533,"uuid":"93218316","full_name":"shellyln/wp-quickstart-caller-example","owner":"shellyln","description":"[DEPRECATED] Usage example of webpack-typescript-lib-quickstart. Quickstart project scaffolding for TypeScript library that runs on browsers and/or Node build with Webpack 2.","archived":true,"fork":false,"pushed_at":"2017-06-23T23:01:41.000Z","size":168,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T02:26:54.768Z","etag":null,"topics":["ci","getting-started","node","postcss","quickstart","scaffolding","scss","starter","starter-template","typescript","webpack","webpack2"],"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/shellyln.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":"2017-06-03T02:32:15.000Z","updated_at":"2024-04-24T02:26:54.769Z","dependencies_parsed_at":"2022-09-09T20:01:00.144Z","dependency_job_id":null,"html_url":"https://github.com/shellyln/wp-quickstart-caller-example","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fwp-quickstart-caller-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fwp-quickstart-caller-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fwp-quickstart-caller-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fwp-quickstart-caller-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellyln","download_url":"https://codeload.github.com/shellyln/wp-quickstart-caller-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234957865,"owners_count":18913363,"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":["ci","getting-started","node","postcss","quickstart","scaffolding","scss","starter","starter-template","typescript","webpack","webpack2"],"created_at":"2024-09-27T22:21:04.140Z","updated_at":"2025-10-02T08:31:25.040Z","avatar_url":"https://github.com/shellyln.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-quickstart-caller-example\nUsage example of [webpack-typescript-lib-quickstart](https://github.com/shellyln/webpack-typescript-lib-quickstart).\n\n\n[![npm](https://img.shields.io/npm/v/wp-quickstart-caller-example.svg)](https://www.npmjs.com/package/wp-quickstart-caller-example)\n[![GitHub release](https://img.shields.io/github/release/shellyln/wp-quickstart-caller-example.svg)](https://github.com/shellyln/wp-quickstart-caller-example/releases)\n[![Travis](https://img.shields.io/travis/shellyln/wp-quickstart-caller-example/master.svg)](https://travis-ci.org/shellyln/wp-quickstart-caller-example)\n[![GitHub forks](https://img.shields.io/github/forks/shellyln/wp-quickstart-caller-example.svg?style=social\u0026label=Fork)](https://github.com/shellyln/wp-quickstart-caller-example/fork)\n[![GitHub stars](https://img.shields.io/github/stars/shellyln/wp-quickstart-caller-example.svg?style=social\u0026label=Star)](https://github.com/shellyln/wp-quickstart-caller-example)\n\n---\n\n### Features\n* Use and extend `webpack-typescript-lib-quickstart` library.  \n  See `src/index.ts` and `src/lib/MathTwo.ts`.\n* Extend `webpack-typescript-lib-quickstart`'s stylesheet.  \n  See `src/assets/scss/main.scss`.\n* Compile TypeScript source and output as CommonJS format with declaration information and source map.\n* Compile TypeScript source and output as CommonJS format single file with declaration information source map.  \n  (Declaration information settings are disabled. See tsconfig-webpack-node-dist.json.)\n* Compile TypeScript source and output as AMD format single file with source map.\n* Compile SCSS, auto-prefixing (PostCSS), and output as single CSS file with source map.\n* Run unit tests ([jasmine](https://jasmine.github.io/)).\n* Include CI configurations\n  ([Travis CI](https://travis-ci.org/),\n   [bitbucket pipelines](https://www.atlassian.com/software/bitbucket/features/pipelines),\n   [Wercker](http://www.wercker.com/),\n   [AWS CodeBuild](https://aws.amazon.com/codebuild/)).\n* Include Visual Studio Code debugger and tasks configurations.\n\n\n\n\n# Usage (runs on Node)\n1. Fork and clone me.\n1. Edit package informations of `package.json`.  \n   Don't remember to change repository url, author, homepage.\n1. Write your code.\n1. and build it.  \n  ```sh\n  npm run build\n  npm test\n  ```\n\n\n\n\n# Usage (runs on browsers)\n1. Fork and clone me.\n1. Edit package informations of `package.json`.  \n   Don't remember to change repository url, author, homepage.\n1.  Edit `webpack.config.js`.  \n    ```javascript\n    // [Node-single-js-file]: Packing a Node single Javascript file.\n    {\n        entry: {\n            // TODO: YOU SHOULD REPLACE THE LIBRARY OUTPUT NAME!\n            \u003cyour-output-name\u003e: path.resolve(__dirname, 'src/index.ts')\n        },\n        output: {\n            // TODO: YOU SHOULD REPLACE THE LIBRARY NAME!\n            library: '\u003cyour-library-name\u003e',\n            ...\n        },\n        module: {\n            rules: [{\n                test: /\\.tsx?$/,\n                ...\n\n                // TODO: You should add/remove the referenced packages paths.\n                // TODO: YOU SHOULD REPLACE THE PACKAGE NAME!\n                exclude: /node_modules[\\/\\\\](?!(webpack-typescript-lib-quickstart)|(wp-quickstart-caller-example)).*$/\n            }, {\n                test: /\\.jsx?$/,\n                ...\n\n                // TODO: You should add/remove the referenced packages paths.\n                // TODO: YOU SHOULD REPLACE THE PACKAGE NAME!\n                exclude: /node_modules[\\/\\\\](?!(webpack-typescript-lib-quickstart)|(wp-quickstart-caller-example)).*$/\n            }, {\n            ...\n    },\n\n    // [Browser-single-js-file]: Packing a library Javascript file.\n    {\n        entry: {\n            // TODO: YOU SHOULD REPLACE THE LIBRARY OUTPUT NAME!\n            \u003cyour-output-name\u003e: path.resolve(__dirname, 'src/index.ts')\n        },\n        output: {\n            // TODO: YOU SHOULD REPLACE THE LIBRARY NAME!\n            library: '\u003cyour-library-name\u003e',\n            ...\n        },\n        module: {\n            rules: [{\n                test: /\\.tsx?$/,\n                ...\n\n                // TODO: You should add/remove the referenced packages paths.\n                // TODO: YOU SHOULD REPLACE THE PACKAGE NAME!\n                exclude: /node_modules[\\/\\\\](?!(webpack-typescript-lib-quickstart)|(wp-quickstart-caller-example)).*$/\n            }, {\n                test: /\\.jsx?$/,\n                ...\n\n                // TODO: You should add/remove the referenced packages paths.\n                // TODO: YOU SHOULD REPLACE THE PACKAGE NAME!\n                exclude: /node_modules[\\/\\\\](?!(webpack-typescript-lib-quickstart)|(wp-quickstart-caller-example)).*$/\n            }, {\n            ...\n    },\n\n    // Packing a library CSS file.\n    {\n            ...\n            // TODO: You should add/remove the referenced packages assets paths.\n            alias: {\n                \"../images\": \"webpack-typescript-lib-quickstart/src/assets/images\"\n            },\n            ...\n\n            ...\n            // TODO: You should add/remove the referenced packages assets paths.\n            includePaths: [\n                path.resolve(\"./node_modules/webpack-typescript-lib-quickstart/src/assets/scss\")\n            ],\n            ...\n    }\n    ```\n1. Write your code.\n1. and build it.  \n   ```sh\n   npm run build\n   npm test\n   ```\n1. Deploy `dist/\u003cyour-library-name\u003e.min.js`.\n\n\n\n\n# Usage (Compile SCSS Stylesheets to single CSS file)\n1. Fork and clone me.\n1. Edit package informations of `package.json`.  \n   Don't remember to change repository url, author, homepage.\n1. Write your code.\n1. and build it.  \n   ```sh\n   npm run build\n   ```\n1. Deploy `dist/style.min.css`.\n\n\n\n\n# Debugging with Webpack\n1. `npm run watch`\n1. Run debbuger.\n1. Fix anything and save it.\n1. Go back to line 2.\n\n\n\n\n# Directory structure\n* /bin/ : Output directory of Node module javascript file (CommonJS) that build with tsc.\n* /bin/index_single.js : Node module javascript single file (CommonJS) that build+packed by Webpack.\n* /dist/ : Output directory of distribution javascript file (AMD ; for browsers) and stylesheet file that build+packed by Webpack.\n* /declarations/ : Output directory of TypeScript declaration.\n* /spec/ : Directory of [jasmine](https://jasmine.github.io/) configurations.\n* /src/index.ts : Library main file.\n* /src/app.ts : Debugger entry point file.\n* /src/lib/ : Directory of library program codes.\n* /src/spec/ : Directory of unit test codes. We use [jasmine](https://jasmine.github.io/).\n* /src/assets/scss/ : Directory of stylesheet source.\n* /src/assets/ : Assets requiring from example code (lib/AssetsLoader) that packed to JS file by Webpack.\n* /src/views/ : Assets requiring from example code (lib/AssetsLoader) that packed to JS file by Webpack.\n* /.babelrc : Babel configuration.\n* /.gitignore : git ignore list.\n* /.npmignore : NPM ignore list.\n* /package.json : NPM package configuration.\n* /tsconfig.json : [TypeScript compiler options](https://www.typescriptlang.org/docs/handbook/compiler-options.html) for Node module output. it also uses for IDEs' error checking and coding assistance.\n* /tsconfig-webpack-node.json : [TypeScript compiler options](https://www.typescriptlang.org/docs/handbook/compiler-options.html) for Node module single file output.\n* /tsconfig-webpack-dist.json : [TypeScript compiler options](https://www.typescriptlang.org/docs/handbook/compiler-options.html) for distribution single file output.\n* /webpack.config.js : [Webpack2 build configuration](https://webpack.js.org/configuration/).\n* /.travis.yml : [Travis CI](https://travis-ci.org/) test and deploying pipeline configuration.\n* /bitbucket-pipelines.yml : [bitbucket pipelines](https://www.atlassian.com/software/bitbucket/features/pipelines) test and deploying pipeline configuration.\n* /bitbucket-heroku-deploy.sh : bitbucket test and deploying pipeline helper shell script.\n* /wercker.yml : [Wercker](http://www.wercker.com/) test and deploying pipeline configuration.\n* /buildspec.yml : AWS CodeBuild test and deploying pipeline configuration.\n* /buildspec-heroku-pre-deploy.sh : AWS CodeBuild test and deploying pipeline helper shell script.\n* /buildspec-heroku-deploy.sh : AWS CodeBuild test and deploying pipeline helper shell script.\n\n\n\n\n# NPM scripts\n* build : Build for production.\n* rebuild : Clean all output and build for production.\n* build:node:dev : Build Node module output (CommonJS) for develop.\n* build:node:prod : Build Node module output (CommonJS) for production.\n* build:dist:dev : Build distribution output (AMD) for develop.\n* build:dist:prod : Build distribution output (AMD) for production.\n* clean : Clean all output.\n* test : Run unit tests.\n* start : Run codes for debugging (bin/app.js).\n* watch : Build distribution output and watch continuously.\n\n\n\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellyln%2Fwp-quickstart-caller-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellyln%2Fwp-quickstart-caller-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellyln%2Fwp-quickstart-caller-example/lists"}