Skip to content

Commit

Permalink
feat: add nostats subset
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhulce committed Aug 14, 2020
1 parent 107e6dd commit 15710c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/build-entity-json-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ for (const entity of entitiesInHTTPArchive) {
}

fs.writeFileSync(`${DIST_DIR}/entities.json`, stringifyEntities(sourceEntities))
fs.writeFileSync(
`${DIST_DIR}/entities-nostats.json`,
stringifyEntities(sourceEntities.map(e => cleanStatsFromEntity(e)))
)
fs.writeFileSync(`${DIST_DIR}/entities-httparchive.json`, stringifyEntities(entitiesInHTTPArchive))
fs.writeFileSync(
`${DIST_DIR}/entities-httparchive-nostats.json`,
Expand Down
1 change: 1 addition & 0 deletions lib/subsets/nostats.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../index'
3 changes: 3 additions & 0 deletions lib/subsets/nostats.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const {createAPIFromDataset} = require('../create-entity-finder-api.js')
const entities = require('../../dist/entities-nostats.json')
module.exports = createAPIFromDataset(entities)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
},
"config": {
"exportAliases": {
"nostats-subset": "./lib/subsets/nostats.js",
"httparchive-nostats-subset": "./lib/subsets/httparchive-nostats.js",
"httparchive-subset": "./lib/subsets/httparchive.js"
}
Expand Down

0 comments on commit 15710c2

Please sign in to comment.