declapract-typescript-ehmpathy 0.23.2 → 0.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,18 @@
1
- import { FileCheckType } from 'declapract';
1
+ import { FileCheckType, FileContentsFunction } from 'declapract';
2
+
3
+ import { readFile } from '../../../utils/readFile';
4
+
5
+ export const contents: FileContentsFunction = async (context) => {
6
+ // grab the superset of best practices content
7
+ const contentsSuperset = await readFile(`${__dirname}/package.json`);
8
+
9
+ // remove things that are irrelevant, based on other practices in use in project
10
+ let contents = contentsSuperset;
11
+ if (!context.projectPractices.includes('artifact'))
12
+ contents = contents.replace(` && npm run build:artifact`, '');
13
+
14
+ // return the narrowed contents
15
+ return contents;
16
+ };
2
17
 
3
18
  export const check = FileCheckType.CONTAINS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declapract-typescript-ehmpathy",
3
- "version": "0.23.2",
3
+ "version": "0.23.3",
4
4
  "description": "declapract best practices declarations for typescript",
5
5
  "main": "src/index.js",
6
6
  "repository": "ehmpathy/declapract-typescript-ehmpathy",