{"id":13548941,"url":"https://github.com/spotify/quickstart","last_synced_at":"2025-04-02T22:31:07.988Z","repository":{"id":18109970,"uuid":"21179790","full_name":"spotify/quickstart","owner":"spotify","description":"A CommonJS module resolver, loader and compiler for node.js and browsers.","archived":true,"fork":false,"pushed_at":"2016-02-23T16:06:52.000Z","size":86,"stargazers_count":192,"open_issues_count":1,"forks_count":10,"subscribers_count":121,"default_branch":"master","last_synced_at":"2025-03-06T15:12:15.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://spotify.github.io/quickstart/","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/spotify.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}},"created_at":"2014-06-24T20:29:24.000Z","updated_at":"2025-03-04T10:53:26.000Z","dependencies_parsed_at":"2022-07-10T07:01:12.908Z","dependency_job_id":null,"html_url":"https://github.com/spotify/quickstart","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fquickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fquickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fquickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fquickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spotify","download_url":"https://codeload.github.com/spotify/quickstart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905096,"owners_count":20852809,"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-08-01T12:01:16.268Z","updated_at":"2025-04-02T22:31:07.553Z","avatar_url":"https://github.com/spotify.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# [Deprecated]\n\nQuickStart is no longer maintained. It will still exist in npm, but no more updates will happen. We no longer use QuickStart at Spotify, and instead recommend other bundlers such as [Browserify](http://browserify.org/) or [Webpack](https://webpack.github.io/).\n\n# [QuickStart](http://spotify.github.io/quickstart)\n\nA CommonJS module resolver, loader and compiler for node.js and browsers.\n\n## Features\n\n* Runs in node.js **and browsers**.\n* Supports (most) node builtins and globals.\n* SpiderMonkey AST based Plugin system.\n* Stylish logs.\n\n## General Usage\n\n### Install QuickStart globally (for the cli)\n\n```\nnpm install quickstart -g\n```\n\n### Add index.html, package.json for your application\n\n```\ncd my-awesome-app\n```\n\nindex.html\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eAwesomeness\u003c/title\u003e\n    \u003cscript src=\"./quickstart.js\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e\n```\n\npackage.json\n```json\n{\n  \"name\": \"my-awesome-app\"\n}\n```\n\n### Install needed npm packages, QuickStart and plugins locally\n\n```\nnpm install underscore --save\nnpm install quickstart some-quickstart-transform --save-dev\n```\n\n### Build a development QuickStart file.\n\n```\nquickstart --transforms some-quickstart-transform --self \u003e quickstart.js\n```\n\nQuickStart will build a standalone QuickStart compiler (for browsers) that includes plugins.\nIf you want to install or remove QuickStart plugins, or change options, repeat this step.\n\nAfter that, simply link `quickstart.js` in the `\u003chead\u003e` of a document. It will compile and load your application at runtime in the browser.\n\n### Deploy\n\n```\nquickstart --transforms some-quickstart-transform \u003e awesome.js\n```\n\nThis will create a compiled application for deployment.\n\nNow simply replace `quickstart.js` with `awesome.js`\n\n```html\n\u003cscript src=\"./awesome.js\"\u003e\u003c/script\u003e\n```\n\n## Entry Point\n\nQuickStart always starts compiling your application from the entry point.\nThis value might be read from these locations in this order:\n\n1. Manually specified `main` option (command line or node.js).\n2. Resolved automatically with the built-in node-style module resolver.\n\n## Plugin system\n\nQuickStart has two types of plugins: transforms and parsers.\n\n* Parser plugins transform a specific type of source code to a SpiderMonkey AST object.\n* Transform plugins transform a SpiderMonkey AST object to a SpiderMonkey AST object.\n\n## node.js interface\n\n```js\nvar quickstart = require('quickstart');\n\n// the quickstart function returns a promise.\nquickstart({/* options */}).then(function(compiled) {\n  var ast = compiled.ast;\n  var source = compiled.source;\n  var sourceMap = compiled.sourceMap;\n  // print the generated JavaScript, or print / work with the abstract syntax tree, work with sourceMaps, etc.\n});\n```\n\n### options\n\nNote: options might be augmented with the parameter `--config jsonFile.json`. It defaults to quickstart.json, and will be ignored if not found.\n\nCommand line options look the same, except hyphenated.\n\n```js\n{\n  runtime: 'quickstart/runtime/browser', // override the default runtime, defaults to quickstart/runtime/browser\n  transforms: [], // which transforms to use, defaults to none\n  parsers: {}, // which parsers to use for each file extension, defaults to none, except embedded ones such as .js and .json.\n  compress: false, // optimize and mangle the ast and JavaScript output\n  output: true, // generates the (compressed if {compress: true}) JavaScript output, defaults to true\n  sourceMap: false, // generates the (compressed if {compress: true}) source map, defaults to false\n  self: false, // compiles the QuickStart compiler instead of the current app, defaults to false\n  main: false, // override the application's main, defaults to the QuickStart resolver\n  warnings: true // display warning messages, defaults to true\n}\n```\n\n## command line interface\n\n```\nquickstart --help\n```\n\n### options\n\n```\n--runtime runtimeModule # override the default runtime\n--transforms transformModule # which transforms to use\n--parsers ext=parserModule # which parsers to use\n--compress # optimize and mangle the ast and JavaScript output\n--output # generates the (compressed if `--compress` is set) JavaScript output, defaults to true\n--source-map # generates the (compressed if `--compress` is set) source map, defaults to false\n--self # compiles the QuickStart compiler instead of the current app, defaults to false\n--main ./path/to/entry-point # override the application's entry point, defaults to the QuickStart resolver\n--warnings # display warnings messages, defaults to true\n--ast ./path/to/source.ast # writes the ast to a file or *STDOUT*, defaults to false\n```\n\nWhen `--output` is set to a string, it will send the JavaScript output to that file instead of STDOUT.\n```\nquickstart --output output.js\n```\n\nWhen `--source-map` is set to a string, it will send the source map output to that file instead of STDOUT.\n```\nquickstart --source-map output.map \u003e output.js\n```\n\nWhen `--source-map` is set without a value, and `--output` is set, it will append an inline base64 encoded source map to the output.\n```\nquickstart --source-map \u003e output.js\nquickstart --source-map --output output.js\n```\n\nWhen `--source-map` is set and `--output` is unset (`--no-output`) it will write the source map to STDOUT (no value) or the file (value).\n```\nquickstart --no-output --source-map \u003e output.map\nquickstart --no-output --source-map output.map\n```\n\nWhen `--ast` is set without a value the ast is printed to STDOUT.\n```\nquickstart --ast \u003e output.ast\n```\n\nThis is useful, for instance, to pipe the AST to UglifyJS or any other program that accepts a SpiderMonkey AST:\n```\nquickstart --ast --source-map | uglifyjs --spidermonkey \u003e out.js\n```\n\nNote: the `--source-map` option must be set if you need location information in the AST (to have UglifyJS generate a source map, for instance).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fquickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspotify%2Fquickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fquickstart/lists"}