1
0
Fork 1
mirror of https://example.com synced 2024-11-24 06:16:39 +09:00

Create type definition for '*/package.json' (#4014)

* Create type definition for '*/package.json'

* Update tsconfig.json
This commit is contained in:
Acid Chicken (硫酸鶏) 2019-01-31 01:08:43 +09:00 committed by GitHub
parent 8dc7f28744
commit e909eac296
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 6 deletions

3
src/@types/package.json.d.ts vendored Normal file
View file

@ -0,0 +1,3 @@
declare module '*/package.json' {
const version: string;
}

View file

@ -7,7 +7,7 @@ import { URL } from 'url';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
import isUrl = require('is-url');
const pkg = require('../../package.json');
import * as pkg from '../../package.json';
/**
* Path of configuration directory

View file

@ -23,6 +23,7 @@ import notesStats from './daemons/notes-stats';
import loadConfig from './config/load';
import { Config } from './config/types';
import { lessThan } from './prelude/array';
import * as pkg from '../package.json';
const clusterLog = debug('misskey:cluster');
const ev = new Xev();
@ -31,8 +32,6 @@ if (process.env.NODE_ENV != 'production' && process.env.DEBUG == null) {
debug.enable('misskey');
}
const pkg = require('../package.json');
//#region Command line argument definitions
program
.version(pkg.version)

View file

@ -4,8 +4,8 @@ import config from '../../../config';
import Emoji from '../../../models/emoji';
import define from '../define';
import fetchMeta from '../../../misc/fetch-meta';
import * as pkg from '../../../../package.json';
const pkg = require('../../../../package.json');
const client = require('../../../../built/client/meta.json');
export const meta = {

View file

@ -20,7 +20,7 @@ import Note, { pack as packNote } from '../../models/note';
import getNoteSummary from '../../misc/get-note-summary';
import fetchMeta from '../../misc/fetch-meta';
import Emoji from '../../models/emoji';
const pkg = require('../../../package.json');
import * as pkg from '../../../package.json';
const client = `${__dirname}/../../client/`;

View file

@ -15,7 +15,8 @@
"noLib": false,
"strict": true,
"strictNullChecks": false,
"experimentalDecorators": true
"experimentalDecorators": true,
"resolveJsonModule": true
},
"compileOnSave": false,
"include": [