Skip to content

Commit

Permalink
Merge pull request #8 from amarzavery/fixtest
Browse files Browse the repository at this point in the history
Minor updates to the metadata files and generating .npmignore
  • Loading branch information
amarzavery committed Oct 11, 2017
2 parents e0fa67e + 7f62967 commit 0e3b809
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/azure/CodeGeneratorTSa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public override async Task Generate(CodeModel cm)
// webpack.config.js
var webpackConfig = new WebpackConfig { Model = codeModel };
await Write(webpackConfig, Path.Combine("../", "webpack.config.js"));

// .npmignore
var npmIgnore = new NpmIgnore { Model = codeModel };
await Write(npmIgnore, Path.Combine("../", ".npmignore"));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/azure/Model/CodeModelTSa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override string ConstructRuntimeImportForModelIndex()

public override string PackageDependencies()
{
return "\"ms-rest-azure-js\": \"azure/ms-rest-azure-js#master\"";
return "\"ms-rest-azure-js\": \"^0.2.0\"";
}
}
}
4 changes: 4 additions & 0 deletions src/vanilla/CodeGeneratorTS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public override async Task Generate(CodeModel cm)
// webpack.config.js
var webpackConfig = new WebpackConfig { Model = codeModel };
await Write(webpackConfig, Path.Combine("../", "webpack.config.js"));

// .npmignore
var npmIgnore = new NpmIgnore { Model = codeModel };
await Write(npmIgnore, Path.Combine("../", ".npmignore"));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/vanilla/Model/CodeModelTS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public virtual string ConstructRuntimeImportForModelIndex()

public virtual string PackageDependencies()
{
return "\"ms-rest-js\": \"azure/ms-rest-js#master\"";
return "\"ms-rest-js\": \"^0.2.1\"";
}
}
}
48 changes: 48 additions & 0 deletions src/vanilla/Templates/NpmIgnore.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@using System.Linq
@using AutoRest.TypeScript.vanilla.Templates
@inherits AutoRest.Core.Template<AutoRest.TypeScript.Model.CodeModelTS>

#git
.git
.gitignore

#gulp
gulpfile.js

#documentation
doc/
docs/

#dependencies
node_modules/

#samples
sample/
samples/

#tests
test/
tests/
coverage/

#tools and scripts
tools/
scripts/

#IDE settings
*.sln
.vscode/
.idea
.editorconfig
.ntvs_analysis.*

#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
appveyor.yml

# Nuget packages #
.nuget/
packages/
packages.config
10 changes: 5 additions & 5 deletions src/vanilla/Templates/PackageJson.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"webpack": "^3.6.0",
"uglify-es": "^3.1.0"
},
"homepage": "https://github.com/azure/azure-sdk-for-ts",
"homepage": "https://github.com/azure/azure-sdk-for-javascript",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-ts.git"
"url": "https://github.com/azure/azure-sdk-for-javascript.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-ts/issues"
"url": "https://github.com/Azure/azure-sdk-for-javascript/issues"
},
"scripts": {
"tsc": "tsc -p tsconfig.node.json && tsc -p tsconfig.browser.json",
"build": "npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js"
"tsc": "tsc -p tsconfig.json",
"build": "npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o @(Model.Name.ToCamelCase())Bundle.min.js @(Model.Name.ToCamelCase())Bundle.js"
}
}
2 changes: 1 addition & 1 deletion src/vanilla/Templates/TsConfig.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"strictNullChecks": true,
"module": "commonjs",
"outDir": "./dist/lib",
"declaration": "true",
"declaration": true,
"declarationDir": "./typings/lib",
"lib": [ "dom", "dom.iterable", "es5", "es6", "es7", "esnext", "esnext.asynciterable", "es2015.iterable"]
},
Expand Down

0 comments on commit 0e3b809

Please sign in to comment.