Open
Conversation
* Covers the syntax for Search Primitives * Covers the exported functions from the searchjs module * Uses generics to ensure the input and output types are correct.
Codecov Report
@@ Coverage Diff @@
## master #57 +/- ##
=======================================
Coverage 97.32% 97.32%
=======================================
Files 3 3
Lines 187 187
=======================================
Hits 182 182
Misses 5 5 |
Owner
|
Hey Adam; thanks for pulling this into the TypeScript world. I had a few questions:
rollup does support multiple file conversions. I think the right approach is to leave it in Let's do the following:
Then we can merge it in. |
Owner
|
Updated import babel from 'rollup-plugin-babel';
import copy from 'rollup-plugin-copy'
import pkg from './package.json'
export default {
input: 'src/searchjs.js',
output: {
file: pkg.main,
name: 'SEARCHJS',
format: 'umd',
banner: `/* @license searchjs | (c) Searchjs Team and other contributors | https://github.com/deitch/searchjs */`
},
plugins: [babel({
presets: [['@babel/preset-env', {
modules: false
}],
],
}),
copy({
targets: [{ src: 'src/index.d.ts', dest: 'lib/' }]
})
]
};And you need to install npm i --save-dev rollup-plugin-copyWith that, the build process should include it in what is published to npm and make it available at the default path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit does not include wiring the types in to the npm distribution, as I'm uncertain of how to do that correctly with rollup. If you point me in an acceptable direction, I'm happy to update this PR with the code; otherwise, I'm stoked to learn how you do it. ;)
Thank you!