@langri-sha/projen-readme 0.1.0
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.
- package/CHANGELOG.json +48 -0
- package/CHANGELOG.md +18 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/license +10 -0
- package/package.json +36 -0
- package/readme.md +28 -0
- package/src/index.ts +22 -0
package/CHANGELOG.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@langri-sha/projen-readme",
|
|
3
|
+
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Fri, 26 Jul 2024 20:58:04 GMT",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"tag": "@langri-sha/projen-readme_v0.1.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "filip.dupanovic@gmail.com",
|
|
12
|
+
"package": "@langri-sha/projen-readme",
|
|
13
|
+
"commit": "d58e2b444358fb65166d0878c185220c6e0a7bb0",
|
|
14
|
+
"comment": "feat(workspace): Harden Projen component types"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "filip.dupanovic@gmail.com",
|
|
18
|
+
"package": "@langri-sha/projen-readme",
|
|
19
|
+
"commit": "d58e2b444358fb65166d0878c185220c6e0a7bb0",
|
|
20
|
+
"comment": "feat(readme): Add `ReadmeFile`"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"none": [
|
|
24
|
+
{
|
|
25
|
+
"author": "filip.dupanovic@gmail.com",
|
|
26
|
+
"package": "@langri-sha/projen-readme",
|
|
27
|
+
"commit": "d58e2b444358fb65166d0878c185220c6e0a7bb0",
|
|
28
|
+
"comment": "feat(projen): Add Git ignore patterns"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"author": "filip.dupanovic@gmail.com",
|
|
32
|
+
"package": "@langri-sha/projen-readme",
|
|
33
|
+
"commit": "d58e2b444358fb65166d0878c185220c6e0a7bb0",
|
|
34
|
+
"comment": "feat(workspace): Migrate documentation pathnames"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"patch": [
|
|
38
|
+
{
|
|
39
|
+
"author": "email not defined",
|
|
40
|
+
"package": "@langri-sha/projen-readme",
|
|
41
|
+
"commit": "d58e2b444358fb65166d0878c185220c6e0a7bb0",
|
|
42
|
+
"comment": "chore(deps): chore(deps): update dependency projen to v0.84.6"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Change Log - @langri-sha/projen-readme
|
|
2
|
+
|
|
3
|
+
This log was last generated on Fri, 26 Jul 2024 20:58:04 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
<!-- Start content -->
|
|
6
|
+
|
|
7
|
+
## 0.1.0
|
|
8
|
+
|
|
9
|
+
Fri, 26 Jul 2024 20:58:04 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- feat(workspace): Harden Projen component types (filip.dupanovic@gmail.com)
|
|
14
|
+
- feat(readme): Add `ReadmeFile` (filip.dupanovic@gmail.com)
|
|
15
|
+
|
|
16
|
+
### Patches
|
|
17
|
+
|
|
18
|
+
- chore(deps): chore(deps): update dependency projen to v0.84.6 (email not defined)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Project, SampleFile } from 'projen';
|
|
2
|
+
/**
|
|
3
|
+
* Initial `README` for new packages.
|
|
4
|
+
*/
|
|
5
|
+
export interface ReadmeFileOptions {
|
|
6
|
+
readonly filename?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Initial `README` for new packages.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ReadmeFile extends SampleFile {
|
|
12
|
+
constructor(project: Project, { filename }?: ReadmeFileOptions);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,UAAU;gBAEtC,OAAO,EAAE,OAAO,EAChB,EAAE,QAAsB,EAAE,GAAE,iBAAsB;CAMrD"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SampleFile } from 'projen';
|
|
2
|
+
/**
|
|
3
|
+
* Initial `README` for new packages.
|
|
4
|
+
*/
|
|
5
|
+
export class ReadmeFile extends SampleFile {
|
|
6
|
+
constructor(project, { filename = 'README.md' } = {}) {
|
|
7
|
+
super(project, filename, {
|
|
8
|
+
contents: `# ${project.name}\n`,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,MAAM,QAAQ,CAAA;AAS5C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,UAAU;IACxC,YACE,OAAgB,EAChB,EAAE,QAAQ,GAAG,WAAW,KAAwB,EAAE;QAElD,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE;YACvB,QAAQ,EAAE,KAAK,OAAO,CAAC,IAAI,IAAI;SAChC,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/license
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024 Filip Dupanović <filip.dupanovic@gmail.com> (https://langri-sha.com)
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
7
|
+
|
|
8
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@langri-sha/projen-readme",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"bugs": {
|
|
5
|
+
"url": "https://github.com/langri-sha/langri-sha.com/issues"
|
|
6
|
+
},
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/langri-sha/langri-sha.com.git",
|
|
10
|
+
"directory": "packages/projen-readme"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Filip Dupanović",
|
|
15
|
+
"email": "filip.dupanovic@gmail.com",
|
|
16
|
+
"url": "https://langri-sha.com",
|
|
17
|
+
"organization": false
|
|
18
|
+
},
|
|
19
|
+
"type": "module",
|
|
20
|
+
"main": "dist/index.js",
|
|
21
|
+
"scripts": {
|
|
22
|
+
"prepublishOnly": "rm -rf dist; tsc --project tsconfig.build.json"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@langri-sha/tsconfig": "0.10.1",
|
|
26
|
+
"@langri-sha/vitest": "0.1.1"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"projen": "^0.84.0"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\".",
|
|
35
|
+
"types": "dist/index.d.ts"
|
|
36
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @langri-sha/readme
|
|
2
|
+
|
|
3
|
+
A [projen] component for creating sample [`README` files].
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Install dependencies:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install -D @langri-sha/readme
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then, create a `README` component for your projects:
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { Project } from 'projen'
|
|
17
|
+
import { ReadmeFile } from '@langri-sha/readme'
|
|
18
|
+
|
|
19
|
+
const project = new Project({
|
|
20
|
+
name: 'my-project',
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
new ReadmeFile(project)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[readme files]:
|
|
27
|
+
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes
|
|
28
|
+
[projen]: https://projen.io/
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Project, SampleFile } from 'projen'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Initial `README` for new packages.
|
|
5
|
+
*/
|
|
6
|
+
export interface ReadmeFileOptions {
|
|
7
|
+
readonly filename?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Initial `README` for new packages.
|
|
12
|
+
*/
|
|
13
|
+
export class ReadmeFile extends SampleFile {
|
|
14
|
+
constructor(
|
|
15
|
+
project: Project,
|
|
16
|
+
{ filename = 'README.md' }: ReadmeFileOptions = {},
|
|
17
|
+
) {
|
|
18
|
+
super(project, filename, {
|
|
19
|
+
contents: `# ${project.name}\n`,
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
}
|