diff --git a/assets/js/search.js b/assets/js/search.js index 541183e..9d603f7 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -1,3 +1,3 @@ -var typedoc = typedoc || {}; +var typedoc = typedoc || {}; typedoc.search = typedoc.search || {}; - typedoc.search.data = {"kinds":{"64":"Function"},"rows":[{"id":0,"kind":64,"name":"asyncABC","url":"globals.html#asyncabc","classes":"tsd-kind-function"},{"id":1,"kind":64,"name":"sha256","url":"globals.html#sha256","classes":"tsd-kind-function"},{"id":2,"kind":64,"name":"double","url":"globals.html#double","classes":"tsd-kind-function"},{"id":3,"kind":64,"name":"power","url":"globals.html#power","classes":"tsd-kind-function"}]}; \ No newline at end of file + typedoc.search.data = {"kinds":{"4":"Enumeration","16":"Enumeration member","32":"Variable","64":"Function","256":"Interface","1024":"Property","65536":"Type literal","2097152":"Object literal"},"rows":[{"id":0,"kind":4,"name":"Runner","url":"enums/runner.html","classes":"tsd-kind-enum"},{"id":1,"kind":16,"name":"Npm","url":"enums/runner.html#npm","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Runner"},{"id":2,"kind":16,"name":"Yarn","url":"enums/runner.html#yarn","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Runner"},{"id":3,"kind":256,"name":"TypescriptStarterUserOptions","url":"interfaces/typescriptstarteruseroptions.html","classes":"tsd-kind-interface"},{"id":4,"kind":1024,"name":"description","url":"interfaces/typescriptstarteruseroptions.html#description","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":5,"kind":1024,"name":"domDefinitions","url":"interfaces/typescriptstarteruseroptions.html#domdefinitions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":6,"kind":1024,"name":"immutable","url":"interfaces/typescriptstarteruseroptions.html#immutable","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":7,"kind":1024,"name":"install","url":"interfaces/typescriptstarteruseroptions.html#install","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":8,"kind":1024,"name":"nodeDefinitions","url":"interfaces/typescriptstarteruseroptions.html#nodedefinitions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":9,"kind":1024,"name":"projectName","url":"interfaces/typescriptstarteruseroptions.html#projectname","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":10,"kind":1024,"name":"runner","url":"interfaces/typescriptstarteruseroptions.html#runner","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":11,"kind":1024,"name":"strict","url":"interfaces/typescriptstarteruseroptions.html#strict","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":12,"kind":1024,"name":"vscode","url":"interfaces/typescriptstarteruseroptions.html#vscode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterUserOptions"},{"id":13,"kind":256,"name":"TypescriptStarterInferredOptions","url":"interfaces/typescriptstarterinferredoptions.html","classes":"tsd-kind-interface"},{"id":14,"kind":1024,"name":"githubUsername","url":"interfaces/typescriptstarterinferredoptions.html#githubusername","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterInferredOptions"},{"id":15,"kind":1024,"name":"fullName","url":"interfaces/typescriptstarterinferredoptions.html#fullname","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterInferredOptions"},{"id":16,"kind":1024,"name":"email","url":"interfaces/typescriptstarterinferredoptions.html#email","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterInferredOptions"},{"id":17,"kind":1024,"name":"repoURL","url":"interfaces/typescriptstarterinferredoptions.html#repourl","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterInferredOptions"},{"id":18,"kind":1024,"name":"workingDirectory","url":"interfaces/typescriptstarterinferredoptions.html#workingdirectory","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TypescriptStarterInferredOptions"},{"id":19,"kind":256,"name":"TypescriptStarterOptions","url":"interfaces/typescriptstarteroptions.html","classes":"tsd-kind-interface"},{"id":20,"kind":1024,"name":"description","url":"interfaces/typescriptstarteroptions.html#description","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":21,"kind":1024,"name":"domDefinitions","url":"interfaces/typescriptstarteroptions.html#domdefinitions","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":22,"kind":1024,"name":"immutable","url":"interfaces/typescriptstarteroptions.html#immutable","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":23,"kind":1024,"name":"install","url":"interfaces/typescriptstarteroptions.html#install","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":24,"kind":1024,"name":"nodeDefinitions","url":"interfaces/typescriptstarteroptions.html#nodedefinitions","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":25,"kind":1024,"name":"projectName","url":"interfaces/typescriptstarteroptions.html#projectname","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":26,"kind":1024,"name":"runner","url":"interfaces/typescriptstarteroptions.html#runner","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":27,"kind":1024,"name":"strict","url":"interfaces/typescriptstarteroptions.html#strict","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":28,"kind":1024,"name":"vscode","url":"interfaces/typescriptstarteroptions.html#vscode","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":29,"kind":1024,"name":"githubUsername","url":"interfaces/typescriptstarteroptions.html#githubusername","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":30,"kind":1024,"name":"fullName","url":"interfaces/typescriptstarteroptions.html#fullname","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":31,"kind":1024,"name":"email","url":"interfaces/typescriptstarteroptions.html#email","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":32,"kind":1024,"name":"repoURL","url":"interfaces/typescriptstarteroptions.html#repourl","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":33,"kind":1024,"name":"workingDirectory","url":"interfaces/typescriptstarteroptions.html#workingdirectory","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"TypescriptStarterOptions"},{"id":34,"kind":64,"name":"validateName","url":"globals.html#validatename","classes":"tsd-kind-function"},{"id":35,"kind":64,"name":"getIntro","url":"globals.html#getintro","classes":"tsd-kind-function"},{"id":36,"kind":64,"name":"checkArgs","url":"globals.html#checkargs","classes":"tsd-kind-function"},{"id":37,"kind":64,"name":"inquire","url":"globals.html#inquire","classes":"tsd-kind-function"},{"id":38,"kind":4,"name":"Placeholders","url":"enums/placeholders.html","classes":"tsd-kind-enum"},{"id":39,"kind":16,"name":"email","url":"enums/placeholders.html#email","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Placeholders"},{"id":40,"kind":16,"name":"name","url":"enums/placeholders.html#name","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Placeholders"},{"id":41,"kind":16,"name":"username","url":"enums/placeholders.html#username","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Placeholders"},{"id":42,"kind":256,"name":"Tasks","url":"interfaces/tasks.html","classes":"tsd-kind-interface"},{"id":43,"kind":1024,"name":"cloneRepo","url":"interfaces/tasks.html#clonerepo","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Tasks"},{"id":44,"kind":65536,"name":"__type","url":"interfaces/tasks.html#clonerepo.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"Tasks.cloneRepo"},{"id":45,"kind":1024,"name":"initialCommit","url":"interfaces/tasks.html#initialcommit","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Tasks"},{"id":46,"kind":65536,"name":"__type","url":"interfaces/tasks.html#initialcommit.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"Tasks.initialCommit"},{"id":47,"kind":1024,"name":"install","url":"interfaces/tasks.html#install","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Tasks"},{"id":48,"kind":65536,"name":"__type","url":"interfaces/tasks.html#install.__type-2","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"Tasks.install"},{"id":49,"kind":32,"name":"inherit","url":"globals.html#inherit","classes":"tsd-kind-variable tsd-is-not-exported"},{"id":50,"kind":64,"name":"cloneRepo","url":"globals.html#clonerepo","classes":"tsd-kind-function"},{"id":51,"kind":64,"name":"getGithubUsername","url":"globals.html#getgithubusername","classes":"tsd-kind-function"},{"id":52,"kind":64,"name":"getUserInfo","url":"globals.html#getuserinfo","classes":"tsd-kind-function"},{"id":53,"kind":64,"name":"initialCommit","url":"globals.html#initialcommit","classes":"tsd-kind-function"},{"id":54,"kind":64,"name":"install","url":"globals.html#install","classes":"tsd-kind-function"},{"id":55,"kind":64,"name":"getRepoUrl","url":"globals.html#getrepourl","classes":"tsd-kind-function"},{"id":56,"kind":2097152,"name":"LiveTasks","url":"globals.html#livetasks","classes":"tsd-kind-object-literal"},{"id":57,"kind":32,"name":"cloneRepo","url":"globals.html#livetasks.clonerepo","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"LiveTasks"},{"id":58,"kind":32,"name":"initialCommit","url":"globals.html#livetasks.initialcommit","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"LiveTasks"},{"id":59,"kind":32,"name":"install","url":"globals.html#livetasks.install","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"LiveTasks"},{"id":60,"kind":64,"name":"getInferredOptions","url":"globals.html#getinferredoptions","classes":"tsd-kind-function"},{"id":61,"kind":64,"name":"typescriptStarter","url":"globals.html#typescriptstarter","classes":"tsd-kind-function"},{"id":62,"kind":64,"name":"readPackageJson","url":"globals.html#readpackagejson","classes":"tsd-kind-function tsd-is-not-exported"},{"id":63,"kind":64,"name":"writePackageJson","url":"globals.html#writepackagejson","classes":"tsd-kind-function tsd-is-not-exported"},{"id":64,"kind":4,"name":"TestDirectories","url":"enums/testdirectories.html","classes":"tsd-kind-enum tsd-is-not-exported"},{"id":65,"kind":16,"name":"one","url":"enums/testdirectories.html#one","classes":"tsd-kind-enum-member tsd-parent-kind-enum tsd-is-not-exported","parent":"TestDirectories"},{"id":66,"kind":16,"name":"two","url":"enums/testdirectories.html#two","classes":"tsd-kind-enum-member tsd-parent-kind-enum tsd-is-not-exported","parent":"TestDirectories"},{"id":67,"kind":16,"name":"three","url":"enums/testdirectories.html#three","classes":"tsd-kind-enum-member tsd-parent-kind-enum tsd-is-not-exported","parent":"TestDirectories"},{"id":68,"kind":16,"name":"four","url":"enums/testdirectories.html#four","classes":"tsd-kind-enum-member tsd-parent-kind-enum tsd-is-not-exported","parent":"TestDirectories"},{"id":69,"kind":16,"name":"five","url":"enums/testdirectories.html#five","classes":"tsd-kind-enum-member tsd-parent-kind-enum tsd-is-not-exported","parent":"TestDirectories"},{"id":70,"kind":16,"name":"six","url":"enums/testdirectories.html#six","classes":"tsd-kind-enum-member tsd-parent-kind-enum tsd-is-not-exported","parent":"TestDirectories"},{"id":71,"kind":32,"name":"repoURL","url":"globals.html#repourl","classes":"tsd-kind-variable tsd-is-not-exported"},{"id":72,"kind":32,"name":"buildDir","url":"globals.html#builddir","classes":"tsd-kind-variable tsd-is-not-exported"},{"id":73,"kind":64,"name":"hashAllTheThings","url":"globals.html#hashallthethings","classes":"tsd-kind-function tsd-is-not-exported"},{"id":74,"kind":32,"name":"down","url":"globals.html#down","classes":"tsd-kind-variable tsd-is-not-exported"},{"id":75,"kind":32,"name":"up","url":"globals.html#up","classes":"tsd-kind-variable tsd-is-not-exported"},{"id":76,"kind":32,"name":"enter","url":"globals.html#enter","classes":"tsd-kind-variable tsd-is-not-exported"},{"id":77,"kind":64,"name":"ms","url":"globals.html#ms","classes":"tsd-kind-function tsd-is-not-exported"},{"id":78,"kind":64,"name":"testInteractive","url":"globals.html#testinteractive","classes":"tsd-kind-function tsd-is-not-exported"},{"id":79,"kind":64,"name":"sandboxTasks","url":"globals.html#sandboxtasks","classes":"tsd-kind-function tsd-is-not-exported"},{"id":80,"kind":2097152,"name":"sandboxOptions","url":"globals.html#sandboxoptions","classes":"tsd-kind-object-literal tsd-is-not-exported"},{"id":81,"kind":32,"name":"description","url":"globals.html#sandboxoptions.description","classes":"tsd-kind-variable tsd-parent-kind-object-literal tsd-is-not-exported","parent":"sandboxOptions"},{"id":82,"kind":32,"name":"githubUsername","url":"globals.html#sandboxoptions.githubusername","classes":"tsd-kind-variable tsd-parent-kind-object-literal tsd-is-not-exported","parent":"sandboxOptions"},{"id":83,"kind":32,"name":"repoURL","url":"globals.html#sandboxoptions.repourl","classes":"tsd-kind-variable tsd-parent-kind-object-literal tsd-is-not-exported","parent":"sandboxOptions"},{"id":84,"kind":32,"name":"workingDirectory","url":"globals.html#sandboxoptions.workingdirectory","classes":"tsd-kind-variable tsd-parent-kind-object-literal tsd-is-not-exported","parent":"sandboxOptions"},{"id":85,"kind":64,"name":"silenceConsole","url":"globals.html#silenceconsole","classes":"tsd-kind-function tsd-is-not-exported"},{"id":86,"kind":64,"name":"passUpdateNotifier","url":"globals.html#passupdatenotifier","classes":"tsd-kind-function tsd-is-not-exported"},{"id":87,"kind":64,"name":"mockErr","url":"globals.html#mockerr","classes":"tsd-kind-function tsd-is-not-exported"},{"id":88,"kind":64,"name":"asyncABC","url":"globals.html#asyncabc","classes":"tsd-kind-function"},{"id":89,"kind":64,"name":"sha256","url":"globals.html#sha256","classes":"tsd-kind-function"},{"id":90,"kind":64,"name":"sha256Native","url":"globals.html#sha256native","classes":"tsd-kind-function"},{"id":91,"kind":64,"name":"double","url":"globals.html#double","classes":"tsd-kind-function"},{"id":92,"kind":64,"name":"power","url":"globals.html#power","classes":"tsd-kind-function"},{"id":93,"kind":64,"name":"hash","url":"globals.html#hash","classes":"tsd-kind-function tsd-is-not-exported"}]}; \ No newline at end of file diff --git a/enums/placeholders.html b/enums/placeholders.html new file mode 100644 index 0000000..218916c --- /dev/null +++ b/enums/placeholders.html @@ -0,0 +1,217 @@ + + +
+ + +Generated using TypeDoc
+Generated using TypeDoc
+Generated using TypeDoc
+![]()

A typescript starter for building javascript libraries and projects:
-So we can have nice things:
-Before you start, consider using an editor with good typescript support.
-VS Code (below) is a popular option. Editors with typescript support can provide helpful autocomplete, inline documentation, and code refactoring features.
-
-
-
To see how this starter can be used as a dependency in other projects, check out the examples folder. The example above is from examples/node-typescript.
This starter includes a watch task which makes development faster and more interactive. It's particularly helpful for TDD/BDD workflows.
-To start working, install Yarn and run:
-yarn watch
-which will build and watch the entire project for changes (to both the library source files and test source files). As you develop, you can add tests for new functionality – which will initially fail – before developing the new functionality. Each time you save, any changes will be rebuilt and retested.
-
-
-
Since only changed files are rebuilt and retested, this workflow remains fast even for large projects.
-To make getting started easier, the default tsconfig.json is using the config/tsconfig.flexible configuration. This will allow you to get started without many warnings from Typescript.
To enable additional Typescript type checking features (a good idea for mission-critical or large projects), change the extends value in tsconfig.json to ./config/tsconfig.strict.
To generate and view test coverage, run:
-yarn cov
-
- This will create an HTML report of test coverage – source-mapped back to Typescript – and open it in your default browser.
-
-
-
The src folder is analyzed and documentation is automatically generated using typedoc.
-yarn docs
-
- This command generates API documentation for your library in HTML format and opens it in a browser.
-Since types are tracked by Typescript, there's no need to indicate types in JSDoc format. For more information, see the typedoc documentation.
-To generate and publish your documentation to GitHub Pages use the following command:
-yarn docs:publish
-
- Once published, your documentation should be available at the proper GitHub Pages URL for your repo. See this repo's GitHub Pages for an example.
-
-
-
For more advanced documentation generation, you can provide your own typedoc theme, or build your own documentation using the JSON typedoc export:
-yarn docs:json
-
- This project is tooled for Conventional Changelog to make managing releases easier. See the standard-version documentation for more information on the workflow, or CHANGELOG.md for an example.
# bump package.json version, update CHANGELOG.md, git tag the release
-yarn changelog
-
- Bringing together many of the steps above, this repo includes a one-step release command.
-# Standard release
-yarn release
-# Release without bumping package.json version
-yarn changelog -- --first-release
-# PGP sign the release
-yarn changelog -- --sign
-
- This command runs:
-yarn reset: cleans the repo by removing all untracked files and resetting --hard to the latest commit. (Note: this could be destructive.)yarn test: build and fully test the projectyarn docs:publish: generate and publish the latest version of the documentation to GitHub Pagesyarn changelog: bump package.json version, update CHANGELOG.md, and git tag the releaseWhen the script finishes, it will log the final command needed to push the release commit to the repo and publish the package on the npm registry:
git push --follow-tags origin master; npm publish
-Look over the release if you'd like, then execute the command to publish everything.
-You can run the info script for information on each script intended to be individually run.
yarn run info
-
- info:
- Display information about the scripts
- build:
- (Trash and re)build the library
- lint:
- Lint all typescript source files
- unit:
- Build the library and run unit tests
- test:
- Lint, build, and test the library
- watch:
- Watch source files, rebuild library on changes, rerun relevant tests
- cov:
- Run tests, generate the HTML coverage report, and open it in a browser
- docs:
- Generate HTML API documentation and open it in a browser
- docs:publish:
- Generate HTML API documentation and push it to GitHub Pages
- docs:json:
- Generate API documentation in typedoc JSON format
- release:
- Bump package.json version, update CHANGELOG.md, tag a release
- reset:
- Delete all untracked files and reset the repo to the last commit
- publish:
- Reset, build, test, publish docs, and prepare release (a one-step publish process)
-main, module, and browser)The src of typescript-starter is compiled into three separate builds: main, module, and browser. The main build is configured to use the CommonJS module system, while the module build uses the new ES6 module system. The browser build contains two bundles, an ES6 module (the preferred export) and a CommonJS bundle (primarily used for testing).
Because Node.js does not yet support the ES6 module system, Node.js projects which depend on typescript-starter will follow the main field in package.json. Tools which support the new system (like Rollup) will follow the module field, giving them the ability to statically analyze typescript-starter. When building for the browser, newer tools follow the browser field, which will resolve to the browser build's ES6 module.
By convention, tests in typescript-starter are co-located with the files they test. The project is configured to allow tests to be written in Typescript and your library to be imported as if it were being used by another project. (E.g. import { double, power } from 'typescript-starter'.) This makes tests both intuitive to write and easy to read as another form of documentation.
Note, tests are compiled and performed on the final builds in the standard Node.js runtime (rather than an alternative like ts-node) to ensure tests pass in that environment. If you are using ts-node in production, you can modify this project to skip test compilation.
-While both the browser and the Node.js versions of the library are tested, this starter currently does not run the browser tests in a real browser (AVA is currently Node-only). While the current testing system will be sufficient for most use cases, some projects will (also) need to implement a browser-based testing system like karma-ava. (Pull requests welcome!)
-Note: test coverage is only checked against the Node.js implementation. This is much simpler, and works well for libraries where the node and browser implementations have different dependencies and only minor adapter code. With only a few lines of differences (e.g. src/adapters/crypto.browser.ts), including those few lines in test coverage analysis usually isn't necessary.
This starter demonstrates importing and using a CommonJS module (hash.js) for it's hash256 method when built for the browser. See the build:browser-deps package script and rollup.config.js for more details. Of course, your project likely does not need this dependency, so it can be removed. If your library doesn't need to bundle external dependencies for the browser, several other devDependencies can also be removed (browserify, rollup-plugin-alias, rollup-plugin-commonjs, rollup-plugin-node-resolve, etc).
tslibBy default, this project requires tslib as a dependency. This is the recommended way to use Typescript's es6 & es7 transpiling for sizable projects, but you can remove this dependency by removing the importHelpers compiler option in tsconfig.json. Depending on your usage, this may increase the size of your library significantly, as the Typescript compiler will inject it's helper functions directly into every file which uses them. (See also: noEmitHelpers →)
By default, this library targets environments with native (or already-polyfilled) support for es6 features. If your library needs to target Internet Explorer, outdated Android browsers, or versions of Node older than v4, you may need to change the target in tsconfig.json to es5 (rather than es6) and bring in a Promise polyfill (such as es6-promise).
It's a good idea to maintain 100% unit test coverage, and always test in the environments you target.
-