Add Package.swift and move files around

This commit is contained in:
Boris Bügling
2015-12-08 11:45:03 +01:00
parent 0bfd4134f9
commit 372b2e7576
35 changed files with 22 additions and 11 deletions

2
.gitignore vendored
View File

@@ -1 +1,3 @@
.conche/
.build/
Packages/

1
.swift-version Normal file
View File

@@ -0,0 +1 @@
2.2-dev

8
Package.swift Normal file
View File

@@ -0,0 +1,8 @@
import PackageDescription
let package = Package(
name: "Stencil",
dependencies: [
.Package(url: "https://github.com/kylef/PathKit.git", majorVersion: 0, minor: 5),
]
)

View File

@@ -26,9 +26,10 @@ public class Context {
/// Set a variable in the current context, deleting the variable if it's nil
set(value) {
if var dictionary = dictionaries.popLast() {
dictionary[key] = value
dictionaries.append(dictionary)
if let dictionary = dictionaries.popLast() {
var mutable_dictionary = dictionary
mutable_dictionary[key] = value
dictionaries.append(mutable_dictionary)
}
}
}

View File

@@ -16,8 +16,7 @@
"tag": "0.4.0"
},
"source_files": [
"Stencil/*.swift",
"Stencil/TemplateLoader/*.swift"
"Sources/*.swift"
],
"platforms": {
"ios": "8.0",
@@ -29,9 +28,9 @@
},
"test_specification": {
"source_files": [
"StencilSpecs/*.swift",
"StencilSpecs/TemplateLoader/*.swift",
"StencilSpecs/Nodes/*.swift"
"Tests/*.swift",
"Tests/TemplateLoader/*.swift",
"Tests/Nodes/*.swift"
],
"dependencies": {
"Spectre": [ "~> 0.5.0" ],

View File

@@ -4,7 +4,7 @@ import PathKit
describe("Include") {
let path = Path(__FILE__) + ".." + ".." + "StencilSpecs" + "fixtures"
let path = Path(__FILE__) + ".." + ".." + "Tests" + "fixtures"
let loader = TemplateLoader(paths: [path])
$0.describe("parsing") {

View File

@@ -4,7 +4,7 @@ import PathKit
describe("Inheritence") {
let path = Path(__FILE__) + ".." + ".." + "StencilSpecs" + "fixtures"
let path = Path(__FILE__) + ".." + ".." + "Tests" + "fixtures"
let loader = TemplateLoader(paths: [path])
$0.it("can inherit from another template") {

View File

@@ -4,7 +4,7 @@ import PathKit
describe("TemplateLoader") {
let path = Path(__FILE__) + ".." + ".." + "StencilSpecs" + "fixtures"
let path = Path(__FILE__) + ".." + ".." + "Tests" + "fixtures"
let loader = TemplateLoader(paths: [path])
$0.it("returns nil when a template cannot be found") {