我正在尝试使用bower安装最新版本的Bootstrap 4 Beta。
使用此命令:
bower install bootstrap#v4.0.0-beta
结果:
no matches found: bootstrap#v4.0.0-beta
我有什么不对的吗?
我的 bower.json 看起来如下:
{
"name": "bootstrap-starter",
"homepage": "https://github.com/marcuschristiansen/bootstrap-starter",
"authors": [
"Marcus Christiansen <christiansen.marcus@gmail.com>"
],
"description": "All dependencies for the bootstrap starter theme",
"main": "",
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "~2.2.3",
"normalize-scss": "git@github.com:JohnAlbin/normalizescss.git#^4.1.0",
"bootstrap": "4.0",
"font-awesome": "git@github.com:FortAwesome/Font-Awesome.git",
"bourbon": "^4.2.7",
"neat": "^1.8.0"
}
}
答案 0 :(得分:1)
我刚刚使用相同的命令安装了Bootstrap 4 Beta:bower install bootstrap#v4.0.0-beta
,npm版本5.3.0和Bower 1.8.0。
您是否尝试过更新npm和Bower并运行相同的安装命令?
答案 1 :(得分:1)
Bootstrap降低了凉亭支持:
请参阅:http://getbootstrap.com/docs/4.0/migration/#beta-2-changes
import urwid
class Application(object):
'''
The console UI
'''
# The default color palette
_palette = [
('banner', 'black', 'light gray'),
('selectable', 'white', 'black'),
('focus', 'black', 'light gray')
]
def __init__(self):
self._content = [
urwid.Text('Initializing...', align = 'left')
]
# Body
self._body_walker = urwid.SimpleListWalker(self._content)
self._body_list = urwid.ListBox(self._body_walker)
self._body_padding = urwid.Padding(
self._body_list,
left = 1,
right = 1
)
self._body = urwid.LineBox(self._body_padding)
# Loop
self._loop = urwid.MainLoop(
self._body,
self._palette,
unhandled_input = self._handle_input
)
def reset_layout(self):
'''
Resets the console UI to the default layout
'''
self._loop.widget = self._body
self._loop.draw_screen()
def _handle_input(self, key):
'''
Handles user input to the console UI
Args:
key (object): A mouse or keyboard input sequence
'''
if type(key) == str:
if key in ('q', 'Q'):
raise urwid.ExitMainLoop()
elif key in ('h', 'H'):
self.dialog(
[
'Urwid v1.3.1\n',
'\n',
'Press Q to quit\n',
'Press H for help'
]
)
elif type(key) == tuple:
pass
def print(self, string = '', align = 'left'):
'''
Prints a string to the console UI
Args:
string (str): The string to print
align (str): The alignment of the printed text
'''
self._body_walker.append(
urwid.Text(string, align = align)
)
def printf(self, *strings):
'''
Prints multiple strings with different alignment
Args:
strings (tuple): A string, alignment pair
'''
self._body_walker.append(
urwid.Columns(
[
urwid.Text(string, align = align)
for string, align in strings
]
)
)
def start(self):
'''
Starts the console UI
'''
self._loop.run()
def dialog(self, text = ['']):
'''
Overlays a dialog box on top of the console UI
Args:
test (list): A list of strings to display
'''
# Header
header_text = urwid.Text(('banner', 'Help'), align = 'center')
header = urwid.AttrMap(header_text, 'banner')
# Body
body_text = urwid.Text(text, align = 'center')
body_filler = urwid.Filler(body_text, valign = 'top')
body_padding = urwid.Padding(
body_filler,
left = 1,
right = 1
)
body = urwid.LineBox(body_padding)
# Footer
footer = urwid.Button('Okay', self.reset_layout())
footer = urwid.AttrWrap(footer, 'selectable', 'focus')
footer = urwid.GridFlow([footer], 8, 1, 1, 'center')
# Layout
layout = urwid.Frame(
body,
header = header,
footer = footer,
focus_part = 'footer'
)
w = urwid.Overlay(
urwid.LineBox(layout),
self._body,
align = 'center',
width = 40,
valign = 'middle',
height = 10
)
self._loop.widget = w
Application().start()