Browse Source

Get rid of Visual Studio project files for tsconfig

Roel van Uden 9 years ago
parent
commit
602f772fcf

+ 0 - 5
.gitignore

@@ -1,8 +1,3 @@
 dist/
 node_modules/
-obj/
 typings/
-*.dat
-*.dll
-*.suo
-*.tmp

+ 2 - 10
.npmignore

@@ -1,16 +1,8 @@
 extras/
 node_modules/
-obj/
 src/
 typings/
-*.dat
-*.DotSettings
-*.dll
-*.map
-*.njsproj
-*.sln
-*.suo
-*.tmp
 ts.js
+tsconfig.json
 tsd.json
-tslint.json
+tslint.json

+ 0 - 102
crunchyroll.js.njsproj

@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <EnableTypeScript>True</EnableTypeScript>
-    <OutputPath>.</OutputPath>
-    <ProjectGuid>{c5cff68a-d733-4347-83e7-6e5fe58eb0e3}</ProjectGuid>
-    <ProjectHome />
-    <ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{349c5851-65df-11da-9384-00065b846f21};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
-    <ProjectView>ShowAllFiles</ProjectView>
-    <SchemaVersion>2.0</SchemaVersion>
-    <StartupFile>cli.ts</StartupFile>
-    <TypeScriptModuleKind>CommonJS</TypeScriptModuleKind>
-    <TypeScriptNoImplicitAny>True</TypeScriptNoImplicitAny>
-    <TypeScriptOutDir>dist</TypeScriptOutDir>
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
-    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
-    <WorkingDirectory>.</WorkingDirectory>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
-    <TypeScriptSourceMap>True</TypeScriptSourceMap>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
-    <TypeScriptGeneratesDeclarations>True</TypeScriptGeneratesDeclarations>
-  </PropertyGroup>
-  <ItemGroup>
-    <TypeScriptCompile Include="src\cli.ts" />
-    <TypeScriptCompile Include="src\batch.ts" />
-    <TypeScriptCompile Include="src\episode.ts" />
-    <TypeScriptCompile Include="src\index.ts" />
-    <TypeScriptCompile Include="src\request.ts" />
-    <TypeScriptCompile Include="src\series.ts" />
-    <TypeScriptCompile Include="src\subtitle\decode.ts" />
-    <TypeScriptCompile Include="src\subtitle\formats\ass.ts" />
-    <TypeScriptCompile Include="src\subtitle\formats\index.ts" />
-    <TypeScriptCompile Include="src\subtitle\formats\srt.ts" />
-    <TypeScriptCompile Include="src\subtitle\index.ts" />
-    <TypeScriptCompile Include="src\typings.ts" />
-    <TypeScriptCompile Include="src\video\index.ts" />
-    <TypeScriptCompile Include="src\video\merge.ts" />
-    <TypeScriptCompile Include="src\video\stream.ts" />
-    <TypeScriptCompile Include="typings\big-integer\big-integer.d.ts" />
-    <TypeScriptCompile Include="typings\cheerio\cheerio.d.ts" />
-    <TypeScriptCompile Include="typings\commander\commander.d.ts" />
-    <TypeScriptCompile Include="typings\form-data\form-data.d.ts" />
-    <TypeScriptCompile Include="typings\mkdirp\mkdirp.d.ts" />
-    <TypeScriptCompile Include="typings\node\node.d.ts" />
-    <TypeScriptCompile Include="typings\request\request.d.ts" />
-    <TypeScriptCompile Include="typings\xml2js\xml2js.d.ts" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="src\" />
-    <Folder Include="src\subtitle\" />
-    <Folder Include="src\subtitle\formats\" />
-    <Folder Include="src\video\" />
-    <Folder Include="typings" />
-    <Folder Include="typings\big-integer\" />
-    <Folder Include="typings\cheerio\" />
-    <Folder Include="typings\commander\" />
-    <Folder Include="typings\form-data\" />
-    <Folder Include="typings\mkdirp\" />
-    <Folder Include="typings\node" />
-    <Folder Include="typings\request\" />
-    <Folder Include="typings\xml2js\" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />
-  <Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
-  <ProjectExtensions>
-    <VisualStudio>
-      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
-        <WebProjectProperties>
-          <AutoAssignPort>True</AutoAssignPort>
-          <CustomServerUrl>http://localhost:1337</CustomServerUrl>
-          <DevelopmentServerPort>0</DevelopmentServerPort>
-          <DevelopmentServerVPath>/</DevelopmentServerVPath>
-          <IISUrl>http://localhost:48022/</IISUrl>
-          <NTLMAuthentication>False</NTLMAuthentication>
-          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
-          <UseCustomServer>True</UseCustomServer>
-          <UseIIS>False</UseIIS>
-        </WebProjectProperties>
-      </FlavorProperties>
-      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User="">
-        <WebProjectProperties>
-          <AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
-          <AspNetDebugging>True</AspNetDebugging>
-          <EnableENC>False</EnableENC>
-          <ExternalProgram />
-          <NativeDebugging>False</NativeDebugging>
-          <SilverlightDebugging>False</SilverlightDebugging>
-          <SQLDebugging>False</SQLDebugging>
-          <StartAction>CurrentPage</StartAction>
-          <StartCmdLineArguments />
-          <StartExternalURL />
-          <StartPageUrl />
-          <StartWorkingDirectory />
-        </WebProjectProperties>
-      </FlavorProperties>
-    </VisualStudio>
-  </ProjectExtensions>
-</Project>

+ 0 - 22
crunchyroll.js.sln

@@ -1,22 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "crunchyroll.js", "crunchyroll.js.njsproj", "{C5CFF68A-D733-4347-83E7-6E5FE58EB0E3}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Release|Any CPU = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{C5CFF68A-D733-4347-83E7-6E5FE58EB0E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{C5CFF68A-D733-4347-83E7-6E5FE58EB0E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C5CFF68A-D733-4347-83E7-6E5FE58EB0E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{C5CFF68A-D733-4347-83E7-6E5FE58EB0E3}.Release|Any CPU.Build.0 = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

File diff suppressed because it is too large
+ 0 - 9
crunchyroll.js.sln.DotSettings


+ 4 - 4
package.json

@@ -16,21 +16,21 @@
     "crunchyroll": "./bin/crunchyroll"
   },
   "dependencies": {
-    "big-integer": "^1.4.3",
+    "big-integer": "^1.4.4",
     "cheerio": "^0.18.0",
     "commander": "^2.6.0",
     "mkdirp": "^0.5.0",
     "request": "^2.53.0",
-    "xml2js": "^0.4.4"
+    "xml2js": "^0.4.5"
   },
   "devDependencies": {
     "tsd": "^0.5.7",
-    "tslint": "^2.1.0",
+    "tslint": "^2.1.1",
     "typescript": "^1.4.1"
   },
   "scripts": {
     "prepublish": "npm run tsd && node ts",
     "test":  "node ts --only-test",
-    "tsd": "./node_modules/.bin/tsd reinstall --overwrite"
+    "tsd": "tsd reinstall --overwrite"
   }
 }

+ 1 - 1
src/batch.ts

@@ -92,4 +92,4 @@ function parse(args: string[]): typings.IConfigLine {
     .option('-s, --series <s>', 'The series override.')
     .option('-t, --tag <s>', 'The subgroup. (Default: CrunchyRoll)')
     .parse(args);
-}
+}

+ 1 - 1
src/cli.ts

@@ -3,4 +3,4 @@ import batch = require('./batch');
 
 batch(process.argv, (err: any) => {
   if (err) console.error(err.stack || err);
-});
+});

+ 1 - 1
src/episode.ts

@@ -170,4 +170,4 @@ function scrapePlayer(config: typings.IConfig, address: string, id: number, done
       }
     });
   });
-}
+}

+ 1 - 1
src/index.ts

@@ -1,4 +1,4 @@
 'use strict';
 export import batch = require('./batch');
 export import episode = require('./episode');
-export import series = require('./series');
+export import series = require('./series');

+ 1 - 1
src/request.ts

@@ -60,4 +60,4 @@ function modify(options: string|request.Options): request.Options {
     return options;
   }
   return {jar: true, url: options.toString()};
-}
+}

+ 1 - 1
src/series.ts

@@ -94,4 +94,4 @@ function page(config: typings.IConfig, address: string, done: (err: Error, resul
     });
     done(null, {episodes: episodes.reverse(), series: title});
   });
-}
+}

+ 1 - 1
src/subtitle/decode.ts

@@ -73,4 +73,4 @@ function secret(size: number, modulo: number, firstSeed: number, secondSeed: num
     previousValue = oldValue;
   }
   return result;
-}
+}

+ 1 - 1
src/subtitle/formats/ass.ts

@@ -90,4 +90,4 @@ function style(block: typings.ISubtitleStyle): string {
       style.$.margin_r + ',' +
       style.$.margin_v + ',' +
       style.$.encoding).join('\n') + '\n';
-}
+}

+ 1 - 1
src/subtitle/formats/index.ts

@@ -7,4 +7,4 @@ import typings = require('../../typings');
 var main: typings.IFormatterTable = {
   ass: ass,
   srt: srt
-};
+};

+ 1 - 1
src/subtitle/formats/srt.ts

@@ -63,4 +63,4 @@ function time(value: string): string {
   var seconds = prefix(all[3], 2);
   var milliseconds = suffix(all[4], 3);
   return hours + ':' + minutes + ':' + seconds + ',' + milliseconds;
-}
+}

+ 1 - 1
src/subtitle/index.ts

@@ -1,3 +1,3 @@
 'use strict';
 export import decode = require('./decode');
-export import formats = require('./formats/index');
+export import formats = require('./formats/index');

+ 1 - 1
src/typings.ts

@@ -133,4 +133,4 @@ export interface ISubtitleStyle {
       encoding: string;
     };
   }[];
-}
+}

+ 1 - 1
src/video/index.ts

@@ -1,3 +1,3 @@
 'use strict';
 export import merge = require('./merge');
-export import stream = require('./stream');
+export import stream = require('./stream');

+ 1 - 1
src/video/merge.ts

@@ -55,4 +55,4 @@ function unlinkTimeout(videoPath: string, subtitlePath: string, timeout: number)
       if (err) unlinkTimeout(videoPath, subtitlePath, timeout);
     });
   }, timeout);
-}
+}

+ 1 - 1
src/video/stream.ts

@@ -23,4 +23,4 @@ function main(rtmpUrl: string, rtmpInputPath: string, swfUrl: string, filePath:
 function command(): string {
   if (os.platform() !== 'win32') return 'rtmpdump';
   return '"' + path.join(__dirname, '../../bin/rtmpdump.exe') + '"';
-}
+}

+ 5 - 10
ts.js

@@ -50,11 +50,11 @@ function clean(filePaths, done) {
 function compile(filePaths, done) {
   if (isTest) return done(null);
   var execPath = path.join(__dirname, 'node_modules/.bin/tsc');
-  var options = '--declaration --module CommonJS --noImplicitAny --outDir dist';
+  var options = '--declaration --module CommonJS --noImplicitAny --outDir dist --target ES5';
   childProcess.exec([execPath, options].concat(filePaths).join(' '), function(err, stdout) {
-      if (stdout) return done(new Error(stdout));
-      done(null);
-    });
+    if (stdout) return done(new Error(stdout));
+    done(null);
+  });
 }
 
 /**
@@ -83,10 +83,5 @@ function lint(filePaths, handler, done) {
  * @param {function(Error, Array.<string>)} done
  */
 function read(done) {
-  var contents = fs.readFileSync('crunchyroll.js.njsproj', 'utf8');
-  var expression = /<TypeScriptCompile\s+Include="([\w\W]+?\.ts)" \/>/g;
-  var matches;
-  var filePaths = [];
-  while ((matches = expression.exec(contents))) filePaths.push(matches[1]);
-  done(null, filePaths);
+  done(null, JSON.parse(fs.readFileSync('tsconfig.json', 'utf8')).files);
 }

+ 40 - 0
tsconfig.json

@@ -0,0 +1,40 @@
+{
+    "version": "1.4.1",
+    "compilerOptions": {
+        "declaration": true,
+        "noImplicitAny": true,
+        "removeComments": false,
+        "module": "commonjs",
+        "outDir": "dist",
+        "target": "es5"
+    },
+    "filesGlob": [
+        "typings/**/*.ts",
+        "src/**/*.ts"
+    ],
+    "files": [
+        "typings/big-integer/big-integer.d.ts",
+        "typings/cheerio/cheerio.d.ts",
+        "typings/commander/commander.d.ts",
+        "typings/form-data/form-data.d.ts",
+        "typings/mkdirp/mkdirp.d.ts",
+        "typings/node/node.d.ts",
+        "typings/request/request.d.ts",
+        "typings/xml2js/xml2js.d.ts",
+        "src/batch.ts",
+        "src/cli.ts",
+        "src/episode.ts",
+        "src/index.ts",
+        "src/request.ts",
+        "src/series.ts",
+        "src/subtitle/decode.ts",
+        "src/subtitle/formats/ass.ts",
+        "src/subtitle/formats/index.ts",
+        "src/subtitle/formats/srt.ts",
+        "src/subtitle/index.ts",
+        "src/typings.ts",
+        "src/video/index.ts",
+        "src/video/merge.ts",
+        "src/video/stream.ts"
+    ]
+}

Some files were not shown because too many files changed in this diff